summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2018-01-24 21:04:58 +0800
committerJohn Hodge <tpg@mutabah.net>2018-01-24 21:04:58 +0800
commit3fe277c60d6d30b30554e78be13fe5990dd9e608 (patch)
treedbbaaf42ac0b04318265820f573b1500a315fbd0 /src
parent7932cf76d7e783ea76a9b117f33ca45d07db26af (diff)
downloadmrust-3fe277c60d6d30b30554e78be13fe5990dd9e608.tar.gz
standalone_miri - New side-tool to attempt to execute pre-monomorphised MIR
Diffstat (limited to 'src')
-rw-r--r--src/include/tagged_union.hpp2
-rw-r--r--src/mir/mir.hpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/include/tagged_union.hpp b/src/include/tagged_union.hpp
index 3afea50b..6e113d27 100644
--- a/src/include/tagged_union.hpp
+++ b/src/include/tagged_union.hpp
@@ -110,7 +110,7 @@
#define TU_IFLET(CLASS, VAR, TAG, NAME, ...) if(VAR.tag() == CLASS::TAG_##TAG) { auto& NAME = VAR.as_##TAG(); (void)&NAME; __VA_ARGS__ }
// Evil hack: two for loops, the inner stops the outer after it's done.
-#define TU_ARM(VAR, TAG, NAME) case ::std::remove_reference<decltype(VAR)>::type::TAG_##TAG: for(bool tu_lc = true; tu_lc;) for(auto& NAME = VAR.as_##TAG(); true; tu_lc=false)
+#define TU_ARM(VAR, TAG, NAME) case ::std::remove_reference<decltype(VAR)>::type::TAG_##TAG: for(bool tu_lc = true; tu_lc;) for(auto& NAME = VAR.as_##TAG(); tu_lc; tu_lc=false)
//#define TU_TEST(VAL, ...) (VAL.is_##TAG() && VAL.as_##TAG() TEST)
#define TU_TEST1(VAL, TAG1, TEST) (VAL.is_##TAG1() && VAL.as_##TAG1() TEST)
diff --git a/src/mir/mir.hpp b/src/mir/mir.hpp
index 2a623d3c..d4b797ea 100644
--- a/src/mir/mir.hpp
+++ b/src/mir/mir.hpp
@@ -9,6 +9,7 @@
#include <tagged_union.hpp>
#include <vector>
#include <string>
+#include <memory> // std::unique_ptr
#include <hir/type.hpp>
namespace MIR {