summaryrefslogtreecommitdiff
path: root/src/ir/effects.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/effects.h')
-rw-r--r--src/ir/effects.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/ir/effects.h b/src/ir/effects.h
index d3ae9ba20..ad3ab235d 100644
--- a/src/ir/effects.h
+++ b/src/ir/effects.h
@@ -881,9 +881,19 @@ public:
return effects;
}
- void ignoreBranches() {
+ // Ignores all forms of control flow transfers: breaks, returns, and
+ // exceptions. (Note that traps are not considered relevant here - a trap does
+ // not just transfer control flow, but can be seen as halting the entire
+ // program.)
+ //
+ // This function matches transfersControlFlow(), that is, after calling this
+ // method transfersControlFlow() will always return false.
+ void ignoreControlFlowTransfers() {
branchesOut = false;
breakTargets.clear();
+ throws_ = false;
+ delegateTargets.clear();
+ assert(!transfersControlFlow());
}
private: