1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

use Value* constructor of CallSite to create potentially improper site

llvm-svn: 109579
This commit is contained in:
Gabor Greif 2010-07-28 12:19:46 +00:00
parent e27a194ce5
commit f6966fafe3

View File

@ -145,8 +145,8 @@ private:
for (Function::iterator BB = F->begin(), BBE = F->end(); BB != BBE; ++BB) for (Function::iterator BB = F->begin(), BBE = F->end(); BB != BBE; ++BB)
for (BasicBlock::iterator II = BB->begin(), IE = BB->end(); for (BasicBlock::iterator II = BB->begin(), IE = BB->end();
II != IE; ++II) { II != IE; ++II) {
CallSite CS = CallSite::get(II); CallSite CS(cast<Value>(II));
if (CS.getInstruction() && !isa<DbgInfoIntrinsic>(II)) { if (CS && !isa<DbgInfoIntrinsic>(II)) {
const Function *Callee = CS.getCalledFunction(); const Function *Callee = CS.getCalledFunction();
if (Callee) if (Callee)
Node->addCalledFunction(CS, getOrInsertFunction(Callee)); Node->addCalledFunction(CS, getOrInsertFunction(Callee));