aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2007-11-26 03:27:38 +0000
committerOwen Anderson <resistor@mac.com>2007-11-26 03:27:38 +0000
commit4746c62f109c5cccc5d3f7681c9aa792d9e11760 (patch)
treed38a20cb6d4dc0e5a8f0a91b8765ed41682b78c2
parent8b6f04e5edf9e42bc5b2ace833fcb76b73cf6c32 (diff)
downloadexternal_llvm-4746c62f109c5cccc5d3f7681c9aa792d9e11760.zip
external_llvm-4746c62f109c5cccc5d3f7681c9aa792d9e11760.tar.gz
external_llvm-4746c62f109c5cccc5d3f7681c9aa792d9e11760.tar.bz2
Fix a silly bug that Nicholas noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44324 91177308-0d34-0410-b5e6-96231b3b80d8
-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));