summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IPA
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-07-28 12:35:54 +0000
committerGabor Greif <ggreif@gmail.com>2010-07-28 12:35:54 +0000
commit5bf74d648d2867698213e6ccf50ae8a07e702285 (patch)
treeae51161533aad5ee0da4dc2de127ae74aa648bf0 /llvm/lib/Analysis/IPA
parent67a970bff2037d700b1ee2d4e50bb139221cbdaf (diff)
downloadbcm5719-llvm-5bf74d648d2867698213e6ccf50ae8a07e702285.tar.gz
bcm5719-llvm-5bf74d648d2867698213e6ccf50ae8a07e702285.zip
use Value* constructor of CallSite to create potentially improper site, and test that
llvm-svn: 109580
Diffstat (limited to 'llvm/lib/Analysis/IPA')
-rw-r--r--llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp b/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
index 0c01ee5b828..5c4b2c3a793 100644
--- a/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
+++ b/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
@@ -209,7 +209,7 @@ bool CGPassManager::RefreshCallGraph(CallGraphSCC &CurSCC,
// If the call edge is not from a call or invoke, then the function
// pass RAUW'd a call with another value. This can happen when
// constant folding happens of well known functions etc.
- CallSite::get(I->first).getInstruction() == 0) {
+ !CallSite(I->first)) {
assert(!CheckingMode &&
"CallGraphSCCPass did not update the CallGraph correctly!");
@@ -245,8 +245,8 @@ bool CGPassManager::RefreshCallGraph(CallGraphSCC &CurSCC,
for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB)
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) {
- CallSite CS = CallSite::get(I);
- if (!CS.getInstruction() || isa<DbgInfoIntrinsic>(I)) continue;
+ CallSite CS(cast<Value>(I));
+ if (!CS || isa<DbgInfoIntrinsic>(I)) continue;
// If this call site already existed in the callgraph, just verify it
// matches up to expectations and remove it from CallSites.
OpenPOWER on IntegriCloud