diff options
author | John Hodge <tpg@mutabah.net> | 2016-08-21 19:16:24 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-08-21 19:16:24 +0800 |
commit | 0bfeff2cadc2f20f9fcceff0a109c046fc08606b (patch) | |
tree | 701f709d6dae1e5c6adb802346c6a3c1061e3a62 /src/mir/mir.hpp | |
parent | 61bce0a54921616748112accfcb0352d23d2db43 (diff) | |
download | mrust-0bfeff2cadc2f20f9fcceff0a109c046fc08606b.tar.gz |
MIR Check - Check for `Invalid` terminators
- `Invalid` indicates the block wasn't ended during generation
Diffstat (limited to 'src/mir/mir.hpp')
-rw-r--r-- | src/mir/mir.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mir/mir.hpp b/src/mir/mir.hpp index 2b9a0a81..8989ac35 100644 --- a/src/mir/mir.hpp +++ b/src/mir/mir.hpp @@ -137,11 +137,11 @@ TAGGED_UNION(RValue, Use, ); TAGGED_UNION(Terminator, Incomplete, - (Incomplete, struct {}), - (Return, struct {}), - (Diverge, struct {}), - (Goto, BasicBlockId), - (Panic, struct { BasicBlockId dst; }), + (Incomplete, struct {}), // Block isn't complete (ERROR in output) + (Return, struct {}), // Return clealy to caller + (Diverge, struct {}), // Continue unwinding up the stack + (Goto, BasicBlockId), // Jump to another block + (Panic, struct { BasicBlockId dst; }), // ? (If, struct { LValue cond; BasicBlockId bb0; |