diff options
Diffstat (limited to 'src/ir/branch-utils.h')
-rw-r--r-- | src/ir/branch-utils.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ir/branch-utils.h b/src/ir/branch-utils.h index d433a421e..3527f1b36 100644 --- a/src/ir/branch-utils.h +++ b/src/ir/branch-utils.h @@ -327,6 +327,12 @@ struct BranchAccumulator auto selfBranches = getUniqueTargets(curr); branches.insert(selfBranches.begin(), selfBranches.end()); } + + static NameSet get(Expression* tree) { + BranchAccumulator accumulator; + accumulator.walk(tree); + return accumulator.branches; + } }; // A helper structure for the common case of post-walking some IR while querying |