]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ast.c
the IR won't create globals of the same name - make names starting with # an exception
[xonotic/gmqcc.git] / ast.c
diff --git a/ast.c b/ast.c
index d519919ac10b50504b4c0e7d846be66c6cb5fe90..b1922729093106c3ae5690130f0f5d77df9d583e 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -510,8 +510,10 @@ bool ast_global_codegen(ast_value *self, ir_builder *ir)
     }
 
     v = ir_builder_create_global(ir, self->name, self->expression.vtype);
-    if (!v)
+    if (!v) {
+        printf("ir_builder_create_global failed\n");
         return false;
+    }
 
     if (self->isconst) {
         switch (self->expression.vtype)