From 0bfeff2cadc2f20f9fcceff0a109c046fc08606b Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 21 Aug 2016 19:16:24 +0800 Subject: MIR Check - Check for `Invalid` terminators - `Invalid` indicates the block wasn't ended during generation --- src/mir/mir.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mir/mir.hpp') 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; -- cgit v1.2.3