aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/IPA/CallGraph.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/IPA/CallGraph.cpp')
-rw-r--r--lib/Analysis/IPA/CallGraph.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp
index eaa0d0181a..19d0fd5190 100644
--- a/lib/Analysis/IPA/CallGraph.cpp
+++ b/lib/Analysis/IPA/CallGraph.cpp
@@ -26,9 +26,7 @@ using namespace llvm;
/// takes the address of the function.
static bool isOnlyADirectCall(Function *F, CallSite CS) {
if (!CS.getInstruction()) return false;
- for (CallSite::arg_iterator I = CS.arg_begin(), E = CS.arg_end(); I != E; ++I)
- if (*I == F) return false;
- return true;
+ return !CS.hasArgument(F);
}
namespace {