summaryrefslogtreecommitdiff
path: root/src/mir/from_hir.hpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-12-18 19:44:43 +0800
committerJohn Hodge <tpg@mutabah.net>2016-12-18 19:44:43 +0800
commit1854bfcb56e13a131ff76754d4a3125f7a8c2f71 (patch)
treeeac461a2d0369c39dd89597eab075206aa2de842 /src/mir/from_hir.hpp
parentd4d935a1f5390de5765e77d5f6c724e47213c243 (diff)
downloadmrust-1854bfcb56e13a131ff76754d4a3125f7a8c2f71.tar.gz
MIR Gen - Prevent returned values from being dropped
Diffstat (limited to 'src/mir/from_hir.hpp')
-rw-r--r--src/mir/from_hir.hpp4
1 files changed, 4 insertions, 0 deletions
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);