summaryrefslogtreecommitdiff
path: root/ast_to_hir.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-06-23 11:37:12 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-06-23 15:20:29 -0700
commit4b6fd39c89f308a379882426c1ed3616d60c4628 (patch)
tree2c8f6f7e2e3eae5922a91c61a686457c614068fe /ast_to_hir.cpp
parent02fc4b34e40f655eebc99f6502293b4d4000e0b3 (diff)
Add a virtual clone() method to ir_instruction.
This will be used by function inlining, the linker, and avoiding double usage of the LHS deref chains in ++, *=, and similar operations.
Diffstat (limited to 'ast_to_hir.cpp')
-rw-r--r--ast_to_hir.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp
index aa90d4b663..b4692c6922 100644
--- a/ast_to_hir.cpp
+++ b/ast_to_hir.cpp
@@ -2171,8 +2171,7 @@ ast_jump_statement::hir(exec_list *instructions,
if (loop != NULL) {
ir_loop_jump *const jump =
- new ir_loop_jump(loop,
- (mode == ast_break)
+ new ir_loop_jump((mode == ast_break)
? ir_loop_jump::jump_break
: ir_loop_jump::jump_continue);
instructions->push_tail(jump);
@@ -2251,7 +2250,7 @@ ast_iteration_statement::condition_to_hir(ir_loop *stmt,
ir_if *const if_stmt = new ir_if(not_cond);
ir_jump *const break_stmt =
- new ir_loop_jump(stmt, ir_loop_jump::jump_break);
+ new ir_loop_jump(ir_loop_jump::jump_break);
if_stmt->then_instructions.push_tail(break_stmt);
stmt->body_instructions.push_tail(if_stmt);