diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ir/branch-utils.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ir/branch-utils.h b/src/ir/branch-utils.h index 58daf5e84..82a563498 100644 --- a/src/ir/branch-utils.h +++ b/src/ir/branch-utils.h @@ -237,6 +237,10 @@ inline NameSet getBranchTargets(Expression* ast) { // Check if an expression defines a particular name as a branch target anywhere // inside it. inline bool hasBranchTarget(Expression* ast, Name target) { + if (!target.is()) { + return false; + } + struct Scanner : public PostWalker<Scanner, UnifiedExpressionVisitor<Scanner>> { Name target; |