]> de.git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ir.c
fix and speed up u8_analyze for our purposes
[xonotic/gmqcc.git] / ir.c
diff --git a/ir.c b/ir.c
index 12f9a5115c4e14dfad82917cb8ae0dd92fe47868..f858bb6e9a535a63eb6233cbcac334e20af3989c 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -1123,7 +1123,7 @@ static char *ir_strdup(const char *str)
 {
     if (str && !*str) {
         /* actually dup empty strings */
-        char *out = mem_a(1);
+        char *out = (char*)mem_a(1);
         *out = 0;
         return out;
     }
@@ -1543,7 +1543,7 @@ ir_instr* ir_block_create_phi(ir_block *self, lex_ctx ctx, const char *label, in
     ir_value *out;
     ir_instr *in;
     if (!ir_check_unreachable(self))
-        return false;
+        return NULL;
     in = ir_instr_new(ctx, self, VINSTR_PHI);
     if (!in)
         return NULL;
@@ -1590,7 +1590,7 @@ ir_instr* ir_block_create_call(ir_block *self, lex_ctx ctx, const char *label, i
     ir_value *out;
     ir_instr *in;
     if (!ir_check_unreachable(self))
-        return false;
+        return NULL;
     in = ir_instr_new(ctx, self, (noreturn ? VINSTR_NRCALL : INSTR_CALL0));
     if (!in)
         return NULL;
@@ -3185,7 +3185,7 @@ static void gen_vector_defs(prog_section_def def, const char *name)
     char  *component;
     size_t len, i;
 
-    if (!name || OPTS_FLAG(SINGLE_VECTOR_DEFS))
+    if (!name || name[0] == '#' || OPTS_FLAG(SINGLE_VECTOR_DEFS))
         return;
 
     def.type = TYPE_FLOAT;