diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-07-18 00:18:30 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-07-18 00:18:30 +0000 |
commit | 30d69a5af91f3a558f0fd6edaf569970bb95f135 (patch) | |
tree | 658977b1e94894d6f7bc8d53c68b8d9f4686108a /llvm/lib/Analysis/IPA/CallGraph.cpp | |
parent | 51fe3361b6731f96ffdb924cb6f4769f03a99a8e (diff) | |
download | bcm5719-llvm-30d69a5af91f3a558f0fd6edaf569970bb95f135.tar.gz bcm5719-llvm-30d69a5af91f3a558f0fd6edaf569970bb95f135.zip |
bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass
llvm-svn: 14942
Diffstat (limited to 'llvm/lib/Analysis/IPA/CallGraph.cpp')
-rw-r--r-- | llvm/lib/Analysis/IPA/CallGraph.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/IPA/CallGraph.cpp b/llvm/lib/Analysis/IPA/CallGraph.cpp index 70bf2c496b0..72b4bdbc520 100644 --- a/llvm/lib/Analysis/IPA/CallGraph.cpp +++ b/llvm/lib/Analysis/IPA/CallGraph.cpp @@ -73,10 +73,8 @@ void CallGraph::addToCallGraph(Function *F) { getNodeFor(Inst->getParent()->getParent())->addCalledFunction(Node); else isUsedExternally = true; - } else if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(*I)) { - // THIS IS A DISGUSTING HACK. Brought to you by the power of - // ConstantPointerRefs! - for (Value::use_iterator I = CPR->use_begin(), E = CPR->use_end(); + } else if (GlobalValue *GV = dyn_cast<GlobalValue>(*I)) { + for (Value::use_iterator I = GV->use_begin(), E = GV->use_end(); I != E; ++I) if (Instruction *Inst = dyn_cast<Instruction>(*I)) { if (isOnlyADirectCall(F, CallSite::get(Inst))) |