summaryrefslogtreecommitdiff
path: root/src/mir/mir.hpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-12-31 19:45:55 +0800
committerJohn Hodge <tpg@mutabah.net>2016-12-31 19:45:55 +0800
commitdce12144273c307d858017c76fabbc574db4337e (patch)
tree61a32386e87674b8b5e1ba141b2503f748d4da8a /src/mir/mir.hpp
parent936db1595619a25fb4a7ccf902e9e8af5852484e (diff)
downloadmrust-dce12144273c307d858017c76fabbc574db4337e.tar.gz
MIR Optimise - Structure for rvalue replacements
Diffstat (limited to 'src/mir/mir.hpp')
-rw-r--r--src/mir/mir.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mir/mir.hpp b/src/mir/mir.hpp
index cacaea99..fb69c7d9 100644
--- a/src/mir/mir.hpp
+++ b/src/mir/mir.hpp
@@ -102,7 +102,7 @@ TAGGED_UNION(Constant, Int,
);
extern ::std::ostream& operator<<(::std::ostream& os, const Constant& v);
-TAGGED_UNION(RValue, Use,
+TAGGED_UNION_EX(RValue, (), Use, (
(Use, LValue),
(Constant, Constant),
(SizedArray, struct {
@@ -163,6 +163,9 @@ TAGGED_UNION(RValue, Use,
unsigned int variant_idx; // if ~0, it's a struct
::std::vector<LValue> vals;
})
+ ), (),(), (
+ RValue clone() const;
+ )
);
extern ::std::ostream& operator<<(::std::ostream& os, const RValue& x);