diff options
author | Eric Anholt <eric@anholt.net> | 2010-06-24 15:13:03 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-06-24 15:13:03 -0700 |
commit | e33c10328caec29616a5433b1d1df9088f3a84df (patch) | |
tree | 723cc38803bb10032d28be9a9a161232d05d0fd1 /ir_dead_code.cpp | |
parent | 9290e0dd28e646c3dc810e0a6405582f8bf643b6 (diff) | |
parent | 26bbfb7917a71d46d9227bbf960606cb673636d3 (diff) |
Merge remote branch 'cworth/master'
Conflicts:
ast_to_hir.cpp
ir.cpp
This brings in the talloc-based memory management work, so that the
compiler (almost) no longer leaks memory.
Diffstat (limited to 'ir_dead_code.cpp')
-rw-r--r-- | ir_dead_code.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ir_dead_code.cpp b/ir_dead_code.cpp index 8465d863aa..01b7d2d832 100644 --- a/ir_dead_code.cpp +++ b/ir_dead_code.cpp @@ -77,6 +77,7 @@ public: variable_entry * ir_dead_code_visitor::get_variable_entry(ir_variable *var) { + void *ctx = talloc_parent(var); assert(var); foreach_iter(exec_list_iterator, iter, this->variable_list) { variable_entry *entry = (variable_entry *)iter.get(); @@ -84,7 +85,7 @@ ir_dead_code_visitor::get_variable_entry(ir_variable *var) return entry; } - variable_entry *entry = new variable_entry(var); + variable_entry *entry = new(ctx) variable_entry(var); this->variable_list.push_tail(entry); return entry; } |