diff options
author | John Hodge <tpg@mutabah.net> | 2016-12-24 12:32:38 +1100 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-12-24 12:32:38 +1100 |
commit | d12a8a886caf2e0edf33c1af831b1df990d2c892 (patch) | |
tree | 83ab5acd97e84b9a9b55ecf69ba76843e182e58d /src/mir/mir_builder.cpp | |
parent | 3c557d2413f1c6f7c1229ea351cce44014d3078b (diff) | |
download | mrust-d12a8a886caf2e0edf33c1af831b1df990d2c892.tar.gz |
MIR Gen - Raise values from LValue::Deref
Diffstat (limited to 'src/mir/mir_builder.cpp')
-rw-r--r-- | src/mir/mir_builder.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mir/mir_builder.cpp b/src/mir/mir_builder.cpp index 835d2ab7..367c4aa1 100644 --- a/src/mir/mir_builder.cpp +++ b/src/mir/mir_builder.cpp @@ -341,6 +341,12 @@ void MirBuilder::raise_variables(const Span& sp, const ::MIR::LValue& val) TU_MATCH_DEF(::MIR::LValue, (val), (e), ( ), + (Deref, + // TODO: This may not be correct, because it can change the drop points and ordering + // HACK: Working around cases where values are dropped while the result is not yet used. + raise_variables(sp, *e.val); + ), + // Actual value types (Variable, auto idx = e; auto scope_it = m_scope_stack.rbegin(); |