summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2007-10-03 19:26:29 +0000
committerDan Gohman <gohman@apple.com>2007-10-03 19:26:29 +0000
commitc731c97facb5ff56daceb724d75f1f14e8d01f39 (patch)
tree700408f7fbcfb3dd5005afb0399dff630d61948b /llvm/lib/Transforms/IPO
parent8c43e41d9bf388195d4b1f32b569193c77ca404a (diff)
downloadbcm5719-llvm-c731c97facb5ff56daceb724d75f1f14e8d01f39.tar.gz
bcm5719-llvm-c731c97facb5ff56daceb724d75f1f14e8d01f39.zip
Use empty() member functions when that's what's being tested for instead
of comparing begin() and end(). llvm-svn: 42585
Diffstat (limited to 'llvm/lib/Transforms/IPO')
-rw-r--r--llvm/lib/Transforms/IPO/Inliner.cpp4
-rw-r--r--llvm/lib/Transforms/IPO/RaiseAllocations.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp
index 85893d706fe..13739a5ea28 100644
--- a/llvm/lib/Transforms/IPO/Inliner.cpp
+++ b/llvm/lib/Transforms/IPO/Inliner.cpp
@@ -63,7 +63,7 @@ static bool InlineCallIfPossible(CallSite CS, CallGraph &CG,
// Remove any call graph edges from the callee to its callees.
CallGraphNode *CalleeNode = CG[Callee];
- while (CalleeNode->begin() != CalleeNode->end())
+ while (!CalleeNode->empty())
CalleeNode->removeCallEdgeTo((CalleeNode->end()-1)->second);
// Removing the node for callee from the call graph and delete it.
@@ -188,7 +188,7 @@ bool Inliner::doFinalization(CallGraph &CG) {
F->use_empty()) {
// Remove any call graph edges from the function to its callees.
- while (CGN->begin() != CGN->end())
+ while (!CGN->empty())
CGN->removeCallEdgeTo((CGN->end()-1)->second);
// Remove any edges from the external node to the function's call graph
diff --git a/llvm/lib/Transforms/IPO/RaiseAllocations.cpp b/llvm/lib/Transforms/IPO/RaiseAllocations.cpp
index ed4a3769dbe..44702bc8179 100644
--- a/llvm/lib/Transforms/IPO/RaiseAllocations.cpp
+++ b/llvm/lib/Transforms/IPO/RaiseAllocations.cpp
@@ -154,7 +154,7 @@ bool RaiseAllocations::runOnModule(Module &M) {
if (Instruction *I = dyn_cast<Instruction>(U)) {
CallSite CS = CallSite::get(I);
- if (CS.getInstruction() && CS.arg_begin() != CS.arg_end() &&
+ if (CS.getInstruction() && !CS.arg_empty() &&
(CS.getCalledFunction() == MallocFunc ||
std::find(EqPointers.begin(), EqPointers.end(),
CS.getCalledValue()) != EqPointers.end())) {
@@ -205,7 +205,7 @@ bool RaiseAllocations::runOnModule(Module &M) {
if (Instruction *I = dyn_cast<Instruction>(U)) {
CallSite CS = CallSite::get(I);
- if (CS.getInstruction() && CS.arg_begin() != CS.arg_end() &&
+ if (CS.getInstruction() && !CS.arg_empty() &&
(CS.getCalledFunction() == FreeFunc ||
std::find(EqPointers.begin(), EqPointers.end(),
CS.getCalledValue()) != EqPointers.end())) {
OpenPOWER on IntegriCloud