summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IPA/CallGraph.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-02 03:41:24 +0000
committerChris Lattner <sabre@nondot.org>2001-10-02 03:41:24 +0000
commitda5581066696da706444b83a5729ea08b9190cd1 (patch)
tree2079bd1429d6b16c94df71bc918fe1f624aa3f2f /llvm/lib/Analysis/IPA/CallGraph.cpp
parent38569343868ee3dad90dcdddfb9fee1ca0bcf25f (diff)
downloadbcm5719-llvm-da5581066696da706444b83a5729ea08b9190cd1.tar.gz
bcm5719-llvm-da5581066696da706444b83a5729ea08b9190cd1.zip
Commit more code over to new cast style
llvm-svn: 697
Diffstat (limited to 'llvm/lib/Analysis/IPA/CallGraph.cpp')
-rw-r--r--llvm/lib/Analysis/IPA/CallGraph.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/IPA/CallGraph.cpp b/llvm/lib/Analysis/IPA/CallGraph.cpp
index b1a272f032e..87dbf2b4255 100644
--- a/llvm/lib/Analysis/IPA/CallGraph.cpp
+++ b/llvm/lib/Analysis/IPA/CallGraph.cpp
@@ -38,10 +38,8 @@ void CallGraph::addToCallGraph(Method *M) {
for (Method::inst_iterator II = M->inst_begin(), IE = M->inst_end();
II != IE; ++II) {
- if (II->getOpcode() == Instruction::Call) {
- CallInst *CI = (CallInst*)*II;
+ if (CallInst *CI = dyn_cast<CallInst>(*II))
Node->addCalledMethod(getNodeFor(CI->getCalledMethod()));
- }
}
}
OpenPOWER on IntegriCloud