]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
While at it: moving generation of reserved:version to just before the functions so...
authorWolfgang Bumiller <blub@speed.at>
Sat, 12 Jan 2013 12:49:06 +0000 (13:49 +0100)
committerWolfgang Bumiller <blub@speed.at>
Sat, 12 Jan 2013 12:49:06 +0000 (13:49 +0100)
parser.c

index 3582dd75c0ab0a8b9c0df7bec040cf83acfc293f..2fc6510e7f7d25716c4e555cd3b86ab3d27b6aec 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -5750,13 +5750,6 @@ bool parser_finish(const char *output)
             return false;
         }
     }
-    if (parser->reserved_version &&
-        !ast_global_codegen(parser->reserved_version, ir, false))
-    {
-        con_out("failed to generate reserved::version");
-        ir_builder_delete(ir);
-        return false;
-    }
     /* Build function vararg accessor ast tree now before generating
      * immediates, because the accessors may add new immediates
      */
@@ -5837,6 +5830,13 @@ bool parser_finish(const char *output)
             return false;
         }
     }
+    if (parser->reserved_version &&
+        !ast_global_codegen(parser->reserved_version, ir, false))
+    {
+        con_out("failed to generate reserved::version");
+        ir_builder_delete(ir);
+        return false;
+    }
     for (i = 0; i < vec_size(parser->functions); ++i) {
         ast_function *f = parser->functions[i];
         if (!ast_function_codegen(f, ir)) {