diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils/PredicateInfo.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/PredicateInfo.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/PredicateInfo.cpp b/llvm/lib/Transforms/Utils/PredicateInfo.cpp index 902977b..186e17e 100644 --- a/llvm/lib/Transforms/Utils/PredicateInfo.cpp +++ b/llvm/lib/Transforms/Utils/PredicateInfo.cpp @@ -478,10 +478,8 @@ void PredicateInfoBuilder::processSwitch( // Remember how many outgoing edges there are to every successor. SmallDenseMap<BasicBlock *, unsigned, 16> SwitchEdges; - for (unsigned i = 0, e = SI->getNumSuccessors(); i != e; ++i) { - BasicBlock *TargetBlock = SI->getSuccessor(i); + for (BasicBlock *TargetBlock : successors(BranchBB)) ++SwitchEdges[TargetBlock]; - } // Now propagate info for each case value for (auto C : SI->cases()) { |