From f6966fafe3a7920309d66847f009ef0009b2da17 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Wed, 28 Jul 2010 12:19:46 +0000 Subject: [PATCH] use Value* constructor of CallSite to create potentially improper site llvm-svn: 109579 --- lib/Analysis/IPA/CallGraph.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp index 0e474e66682..1af0055ce54 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(II)) { + CallSite CS(cast(II)); + if (CS && !isa(II)) { const Function *Callee = CS.getCalledFunction(); if (Callee) Node->addCalledFunction(CS, getOrInsertFunction(Callee));