From 1854bfcb56e13a131ff76754d4a3125f7a8c2f71 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 18 Dec 2016 19:44:43 +0800 Subject: MIR Gen - Prevent returned values from being dropped --- src/mir/from_hir.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mir/from_hir.hpp') diff --git a/src/mir/from_hir.hpp b/src/mir/from_hir.hpp index 3fd933fc..4aa04442 100644 --- a/src/mir/from_hir.hpp +++ b/src/mir/from_hir.hpp @@ -159,6 +159,10 @@ public: // Mark a value as initialised (used for Call, because it has to be done after the panic block is populated) void mark_value_assigned(const Span& sp, const ::MIR::LValue& val); + // Moves control of temporaries up to the next scope + void raise_variables(const Span& sp, const ::MIR::LValue& val); + void raise_variables(const Span& sp, const ::MIR::RValue& rval); + void set_cur_block(unsigned int new_block); ::MIR::BasicBlockId pause_cur_block(); void end_block(::MIR::Terminator term); -- cgit v1.2.3