diff options
author | Dan Gohman <gohman@apple.com> | 2008-08-14 18:13:49 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-08-14 18:13:49 +0000 |
commit | c8424dea0d4d223edbf5b6ed10d92d0567fd3c2c (patch) | |
tree | ae6a11d42901b80c9db1408f7dc3850f114b030c /lib/Transforms | |
parent | 9ca41bad635d3f582b8f4874f11a79e57823b16f (diff) | |
download | external_llvm-c8424dea0d4d223edbf5b6ed10d92d0567fd3c2c.zip external_llvm-c8424dea0d4d223edbf5b6ed10d92d0567fd3c2c.tar.gz external_llvm-c8424dea0d4d223edbf5b6ed10d92d0567fd3c2c.tar.bz2 |
Use empty() instead of begin() == end().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54780 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/IPO/LoopExtractor.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Scalar/LoopIndexSplit.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Utils/SimplifyCFG.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/IPO/LoopExtractor.cpp b/lib/Transforms/IPO/LoopExtractor.cpp index 10ec306..8e55b3f 100644 --- a/lib/Transforms/IPO/LoopExtractor.cpp +++ b/lib/Transforms/IPO/LoopExtractor.cpp @@ -79,7 +79,7 @@ bool LoopExtractor::runOnFunction(Function &F) { LoopInfo &LI = getAnalysis<LoopInfo>(); // If this function has no loops, there is nothing to do. - if (LI.begin() == LI.end()) + if (LI.empty()) return false; DominatorTree &DT = getAnalysis<DominatorTree>(); diff --git a/lib/Transforms/Scalar/LoopIndexSplit.cpp b/lib/Transforms/Scalar/LoopIndexSplit.cpp index 135ce33..1ab9a18 100644 --- a/lib/Transforms/Scalar/LoopIndexSplit.cpp +++ b/lib/Transforms/Scalar/LoopIndexSplit.cpp @@ -1006,9 +1006,9 @@ bool LoopIndexSplit::updateLoopIterationSpace(SplitInfo &SD) { // Remove split condition. SD.SplitCondition->eraseFromParent(); - if (Op0->use_begin() == Op0->use_end()) + if (Op0->use_empty()) Op0->eraseFromParent(); - if (Op1->use_begin() == Op1->use_end()) + if (Op1->use_empty()) Op1->eraseFromParent(); BranchInst *ExitInsn = diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index d04fce6..efd1765 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/lib/Transforms/Utils/SimplifyCFG.cpp @@ -107,7 +107,7 @@ static bool CanPropagatePredecessorsForPHIs(BasicBlock *BB, BasicBlock *Succ) { CommonPreds.insert(*PI); // Shortcut, if there are no common predecessors, merging is always safe - if (CommonPreds.begin() == CommonPreds.end()) + if (CommonPreds.empty()) return true; // Look at all the phi nodes in Succ, to see if they present a conflict when |