diff options
author | Matthijs Kooijman <matthijs@stdin.nl> | 2008-06-04 16:57:50 +0000 |
---|---|---|
committer | Matthijs Kooijman <matthijs@stdin.nl> | 2008-06-04 16:57:50 +0000 |
commit | 227c27dd0628d317fdb71e900809ff7bd39e70d2 (patch) | |
tree | 0df6ce270800c48cf7150ff10b64170245b6a6a2 /lib/Analysis/IPA/CallGraph.cpp | |
parent | 9515a8f88a597e78c32c797e4946ebf7648512c0 (diff) |
Replace two manual loops with calls to CallSite::hasArguments (no functional changes).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51947 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA/CallGraph.cpp')
-rw-r--r-- | lib/Analysis/IPA/CallGraph.cpp | 4 |
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 { |