summaryrefslogtreecommitdiff
path: root/src/trans/monomorphise.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2017-04-22 13:31:07 +0800
committerJohn Hodge <tpg@ucc.asn.au>2017-04-22 13:31:07 +0800
commit83b9e560df97f054dc2ea0660cda3fb55cd274d7 (patch)
tree057be3e50eee6278f00b260a581d08931aa6e929 /src/trans/monomorphise.cpp
parent6f5792ac00800b1a28b8c9c81eb80046f37b2f03 (diff)
downloadmrust-83b9e560df97f054dc2ea0660cda3fb55cd274d7.tar.gz
MIR - Add ScopeEnd statement to indicate where a value will no longer be used
Diffstat (limited to 'src/trans/monomorphise.cpp')
-rw-r--r--src/trans/monomorphise.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/trans/monomorphise.cpp b/src/trans/monomorphise.cpp
index 1688a8f5..1a7d8e79 100644
--- a/src/trans/monomorphise.cpp
+++ b/src/trans/monomorphise.cpp
@@ -150,6 +150,9 @@ namespace {
case ::MIR::Statement::TAG_SetDropFlag:
statements.push_back( ::MIR::Statement( stmt.as_SetDropFlag() ) );
break;
+ case ::MIR::Statement::TAG_ScopeEnd:
+ statements.push_back( ::MIR::Statement( stmt.as_ScopeEnd() ) );
+ break;
case ::MIR::Statement::TAG_Drop: {
const auto& e = stmt.as_Drop();
DEBUG("- DROP " << e.slot);