Fix a silly bug that Nicholas noticed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44324 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson 2007-11-26 03:27:38 +00:00
parent 00a6d1448d
commit 97d4e51df1

View File

@ -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));