X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTransforms%2FIPO%2FRaiseAllocations.cpp;h=44702bc81792f1fe53cbdc5fd5dcae10aaf1e904;hb=cb406c25973b4e88a6c10ad839ef1beeb3664715;hp=ed4a3769dbebe9d99e1fb3671793e7b0d8db6637;hpb=2bb7d0647e5b3f79ad9b6e7efd0dd99f24a0ca69;p=oota-llvm.git diff --git a/lib/Transforms/IPO/RaiseAllocations.cpp b/lib/Transforms/IPO/RaiseAllocations.cpp index ed4a3769dbe..44702bc8179 100644 --- a/lib/Transforms/IPO/RaiseAllocations.cpp +++ b/lib/Transforms/IPO/RaiseAllocations.cpp @@ -154,7 +154,7 @@ bool RaiseAllocations::runOnModule(Module &M) { if (Instruction *I = dyn_cast(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(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())) {