Fix a crasher: we need to check that the function is non-null before using it!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63902 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson 2009-02-06 00:13:43 +00:00
parent e79422096e
commit d9289a54cd

View File

@ -120,7 +120,7 @@ AliasAnalysis::getModRefBehavior(CallSite CS,
AliasAnalysis::ModRefBehavior
AliasAnalysis::getModRefBehavior(Function *F,
std::vector<PointerAccessInfo> *Info) {
if (F->doesNotAccessMemory())
if (F && F->doesNotAccessMemory())
// Can't do better than this.
return DoesNotAccessMemory;
return UnknownModRefBehavior;