summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IPA/CallGraph.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-10-20 03:23:14 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-10-20 03:23:14 +0000
commitf0bb0c2934565faecda1ed27eced70976b05fc4a (patch)
tree3ae080551d97ede22204dc4527f2b1dadd0eefbc /llvm/lib/Analysis/IPA/CallGraph.cpp
parent733f7bb81f276cc42088b5f1ce7850bea1acec6e (diff)
downloadbcm5719-llvm-f0bb0c2934565faecda1ed27eced70976b05fc4a.tar.gz
bcm5719-llvm-f0bb0c2934565faecda1ed27eced70976b05fc4a.zip
Simplify; no intended functional change.
llvm-svn: 142567
Diffstat (limited to 'llvm/lib/Analysis/IPA/CallGraph.cpp')
-rw-r--r--llvm/lib/Analysis/IPA/CallGraph.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/llvm/lib/Analysis/IPA/CallGraph.cpp b/llvm/lib/Analysis/IPA/CallGraph.cpp
index 2e79eab51ff..0df3e8a3821 100644
--- a/llvm/lib/Analysis/IPA/CallGraph.cpp
+++ b/llvm/lib/Analysis/IPA/CallGraph.cpp
@@ -127,16 +127,9 @@ private:
}
}
- // Loop over all of the users of the function, looking for non-call uses.
- for (Value::use_iterator I = F->use_begin(), E = F->use_end(); I != E; ++I){
- User *U = *I;
- if ((!isa<CallInst>(U) && !isa<InvokeInst>(U))
- || !CallSite(cast<Instruction>(U)).isCallee(I)) {
- // Not a call, or being used as a parameter rather than as the callee.
- ExternalCallingNode->addCalledFunction(CallSite(), Node);
- break;
- }
- }
+ // If this function has its address taken, anything could call it.
+ if (F->hasAddressTaken())
+ ExternalCallingNode->addCalledFunction(CallSite(), Node);
// If this function is not defined in this translation unit, it could call
// anything.
OpenPOWER on IntegriCloud