diff options
author | John Hodge <tpg@mutabah.net> | 2016-12-18 19:44:43 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-12-18 19:44:43 +0800 |
commit | 1854bfcb56e13a131ff76754d4a3125f7a8c2f71 (patch) | |
tree | eac461a2d0369c39dd89597eab075206aa2de842 /src/mir/from_hir.hpp | |
parent | d4d935a1f5390de5765e77d5f6c724e47213c243 (diff) | |
download | mrust-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.hpp | 4 |
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); |