summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorManuel Jacob <me@manueljacob.de>2014-07-20 09:20:47 +0000
committerManuel Jacob <me@manueljacob.de>2014-07-20 09:20:47 +0000
commit6d5cc8d656a0e8b17cf8e945522fdf8292f5cdab (patch)
treed0d64726eff6ff02af7860ffdec96bd94a2b8b7a /llvm/lib
parentd11beffef4f1117aceb9f2f5532b4a317c30c05a (diff)
downloadbcm5719-llvm-6d5cc8d656a0e8b17cf8e945522fdf8292f5cdab.tar.gz
bcm5719-llvm-6d5cc8d656a0e8b17cf8e945522fdf8292f5cdab.zip
Remove braces around single-statement block and rangify outer loop.
This is a follow-up to r213474. llvm-svn: 213475
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/BranchProbabilityInfo.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/BranchProbabilityInfo.cpp b/llvm/lib/Analysis/BranchProbabilityInfo.cpp
index a1e4d8efebb..fa9df4c8edb 100644
--- a/llvm/lib/Analysis/BranchProbabilityInfo.cpp
+++ b/llvm/lib/Analysis/BranchProbabilityInfo.cpp
@@ -528,12 +528,9 @@ void BranchProbabilityInfo::print(raw_ostream &OS, const Module *) const {
// We print the probabilities from the last function the analysis ran over,
// or the function it is currently running over.
assert(LastF && "Cannot print prior to running over a function");
- for (Function::const_iterator BI = LastF->begin(), BE = LastF->end();
- BI != BE; ++BI) {
- for (const BasicBlock *Succ : successors(BI)) {
- printEdgeProbability(OS << " ", BI, Succ);
- }
- }
+ for (const BasicBlock &BB : *LastF)
+ for (const BasicBlock *Succ : successors(&BB))
+ printEdgeProbability(OS << " ", &BB, Succ);
}
uint32_t BranchProbabilityInfo::getSumForBlock(const BasicBlock *BB) const {
OpenPOWER on IntegriCloud