projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e75dbf6
)
glsl2: Add validation that talloc ownership of ir_* names is right.
author
Eric Anholt
<eric@anholt.net>
Mon, 2 Aug 2010 19:08:52 +0000
(12:08 -0700)
committer
Eric Anholt
<eric@anholt.net>
Mon, 2 Aug 2010 19:08:52 +0000
(12:08 -0700)
src/glsl/ir_validate.cpp
patch
|
blob
|
history
diff --git
a/src/glsl/ir_validate.cpp
b/src/glsl/ir_validate.cpp
index 1dfac82826919c28b0faa825a3fd452625cb74c4..f9f781b36ab7af08752c49d0a98d0164a90df833 100644
(file)
--- a/
src/glsl/ir_validate.cpp
+++ b/
src/glsl/ir_validate.cpp
@@
-139,7
+139,7
@@
ir_validate::visit_enter(ir_function *ir)
ir_visitor_status
ir_validate::visit_leave(ir_function *ir)
{
-
(void) ir
;
+
assert(talloc_parent(ir->name) == ir)
;
this->current_function = NULL;
return visit_continue;
@@
-313,6
+313,8
@@
ir_validate::visit(ir_variable *ir)
* in the ir_dereference_variable handler to ensure that a variable is
* declared before it is dereferenced.
*/
+ assert(talloc_parent(ir->name) == ir);
+
hash_table_insert(ht, ir, ir);
return visit_continue;
}