summaryrefslogtreecommitdiff
path: root/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
commitce4a62639f64d2f24577ad4e872f01cd7d6bc82f (patch)
treeed69963a73559af6a57642613c0ebffcdf1b9f7f /lib/Analysis/IPA
parent3737984e95e91f6c777414ce5f68fe4c8db32dd5 (diff)
downloadllvm-ce4a62639f64d2f24577ad4e872f01cd7d6bc82f.tar.gz
llvm-ce4a62639f64d2f24577ad4e872f01cd7d6bc82f.tar.bz2
llvm-ce4a62639f64d2f24577ad4e872f01cd7d6bc82f.tar.xz
use Value* constructor of CallSite to create potentially improper site, and test that
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109580 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA')
-rw-r--r--lib/Analysis/IPA/CallGraphSCCPass.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Analysis/IPA/CallGraphSCCPass.cpp b/lib/Analysis/IPA/CallGraphSCCPass.cpp
index 0c01ee5b82..5c4b2c3a79 100644
--- a/lib/Analysis/IPA/CallGraphSCCPass.cpp
+++ b/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.