aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/IPA
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-07-28 12:19:46 +0000
committerGabor Greif <ggreif@gmail.com>2010-07-28 12:19:46 +0000
commit3737984e95e91f6c777414ce5f68fe4c8db32dd5 (patch)
treed5ca2b035f647cc53c3d24374d716f9f6b65bfc5 /lib/Analysis/IPA
parent30ae792f0682ace2f794c6db3f3cb6ab657670a6 (diff)
downloadexternal_llvm-3737984e95e91f6c777414ce5f68fe4c8db32dd5.zip
external_llvm-3737984e95e91f6c777414ce5f68fe4c8db32dd5.tar.gz
external_llvm-3737984e95e91f6c777414ce5f68fe4c8db32dd5.tar.bz2
use Value* constructor of CallSite to create potentially improper site
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109579 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA')
-rw-r--r--lib/Analysis/IPA/CallGraph.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp
index 0e474e6..1af0055 100644
--- a/lib/Analysis/IPA/CallGraph.cpp
+++ b/lib/Analysis/IPA/CallGraph.cpp
@@ -145,8 +145,8 @@ private:
for (Function::iterator BB = F->begin(), BBE = F->end(); BB != BBE; ++BB)
for (BasicBlock::iterator II = BB->begin(), IE = BB->end();
II != IE; ++II) {
- CallSite CS = CallSite::get(II);
- if (CS.getInstruction() && !isa<DbgInfoIntrinsic>(II)) {
+ CallSite CS(cast<Value>(II));
+ if (CS && !isa<DbgInfoIntrinsic>(II)) {
const Function *Callee = CS.getCalledFunction();
if (Callee)
Node->addCalledFunction(CS, getOrInsertFunction(Callee));