RefPtr<FunctionCall> call = new FunctionCall;
call->name = type.name;
call->constructor = true;
- call->arguments.push_back(0);
- call->arguments.back() = expr;
+ call->arguments.push_back_nocopy(expr);
call->type = &type;
expr = call;
}
SetForScope<Pass> set_pass(pass, RENAME);
var->visit(*this);
- staging_block.body.push_back(0);
- staging_block.body.back() = var;
+ staging_block.body.push_back_nocopy(var);
params.push_back(var);
}
SetForScope<Pass> set_pass(pass, RENAME);
r_inlined_statement->visit(*this);
- staging_block.body.push_back(0);
- staging_block.body.back() = r_inlined_statement;
+ staging_block.body.push_back_nocopy(r_inlined_statement);
}
/* Now collect names from the staging block. Local variables that would
public:
NodeContainer() { }
NodeContainer(const NodeContainer &);
+
+ void push_back_nocopy(const typename C::value_type &v)
+ { C::push_back(0); C::back() = v; }
};
template<typename T>