aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/MemoryDependenceAnalysis.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp
index 68366f6..dd567aa 100644
--- a/lib/Analysis/MemoryDependenceAnalysis.cpp
+++ b/lib/Analysis/MemoryDependenceAnalysis.cpp
@@ -94,7 +94,8 @@ Instruction* MemoryDependenceAnalysis::getCallSiteDependency(CallSite C,
// FreeInsts erase the entire structure
pointerSize = ~0UL;
- } else if (CallSite::get(QI).getInstruction() != 0) {
+ } else if (CallSite::get(QI).getInstruction() != 0 &&
+ cast<CallInst>(QI)->getCalledFunction()) {
AliasAnalysis::ModRefBehavior result =
AA.getModRefBehavior(cast<CallInst>(QI)->getCalledFunction(),
CallSite::get(QI));