aboutsummaryrefslogtreecommitdiff
path: root/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
commitb00c582b6d40e6b9ff2d1ed4f5eaf7930e792ace (patch)
tree44b5f879c16e7ecb2e9334ad120e3454270e1bb3 /lib/Analysis/IPA/CallGraph.cpp
parent1d87bcf4909b06dcd86320722653341f08b8b396 (diff)
Commit more code over to new cast style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA/CallGraph.cpp')
-rw-r--r--lib/Analysis/IPA/CallGraph.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp
index b1a272f032..87dbf2b425 100644
--- a/lib/Analysis/IPA/CallGraph.cpp
+++ b/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()));
- }
}
}