Use empty() member functions when that's what's being tested for instead
[oota-llvm.git] / lib / Transforms / IPO / RaiseAllocations.cpp
index ed4a3769dbebe9d99e1fb3671793e7b0d8db6637..44702bc81792f1fe53cbdc5fd5dcae10aaf1e904 100644 (file)
@@ -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())) {