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

llvm-svn: 63902
This commit is contained in:
Owen Anderson 2009-02-06 00:13:43 +00:00
parent 724167c280
commit 5a043f2cb1
1 changed files with 1 additions and 1 deletions

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;