summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/RaiseAllocations.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/IPO/RaiseAllocations.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/RaiseAllocations.cpp4
1 files changed, 2 insertions, 2 deletions
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