glsl2: Fix for dead strings being stored in the symbol table.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 2 Jul 2010 22:02:57 +0000 (15:02 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 3 Jul 2010 01:03:58 +0000 (18:03 -0700)
src/glsl/ir_reader.cpp

index 5ba76e29ea003a8ddc5399d5173f29958edd8e4b..80dbc08645765e7fdc5a10450b420b5d49581525 100644 (file)
@@ -206,7 +206,7 @@ read_function(_mesa_glsl_parse_state *st, s_list *list, bool skip_body)
    ir_function *f = st->symbols->get_function(name->value());
    if (f == NULL) {
       f = new(ctx) ir_function(name->value());
-      bool added = st->symbols->add_function(name->value(), f);
+      bool added = st->symbols->add_function(f->name, f);
       assert(added);
    }
 
@@ -439,7 +439,7 @@ read_declaration(_mesa_glsl_parse_state *st, s_list *list)
    }
 
    // Add the variable to the symbol table
-   st->symbols->add_variable(var_name->value(), var);
+   st->symbols->add_variable(var->name, var);
 
    return var;
 }