]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
ir_builder_imm_float: mark them as const, otherwise they end up getting saved
authorWolfgang Bumiller <wry.git@bumiller.com>
Sat, 18 Oct 2014 11:53:15 +0000 (13:53 +0200)
committerWolfgang Bumiller <wry.git@bumiller.com>
Sat, 18 Oct 2014 11:53:15 +0000 (13:53 +0200)
ir.c

diff --git a/ir.c b/ir.c
index f4f386d260b2a93e8e0fdd01f1fb540b2479f2d3..00d81c25dbb5ae3334b560f1e01476c1afd8cc31 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -1125,6 +1125,7 @@ ir_value* ir_value_var(const char *name, int storetype, int vtype)
 static ir_value* ir_builder_imm_float(ir_builder *self, float value, bool add_to_list) {
     ir_value *v = ir_value_var("#IMMEDIATE", store_global, TYPE_FLOAT);
     v->hasvalue = true;
+    v->cvq = CV_CONST;
     v->constval.vfloat = value;
 
     vec_push(self->globals, v);