diff options
author | Chris Lattner <sabre@nondot.org> | 2001-10-02 03:41:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-10-02 03:41:24 +0000 |
commit | da5581066696da706444b83a5729ea08b9190cd1 (patch) | |
tree | 2079bd1429d6b16c94df71bc918fe1f624aa3f2f /llvm/lib/Analysis/IPA/CallGraph.cpp | |
parent | 38569343868ee3dad90dcdddfb9fee1ca0bcf25f (diff) | |
download | bcm5719-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.cpp | 4 |
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())); - } } } |