[llvm-commits] [llvm] r63902 - /llvm/trunk/lib/Analysis/AliasAnalysis.cpp
Owen Anderson
resistor at mac.com
Thu Feb 5 16:13:43 PST 2009
Author: resistor
Date: Thu Feb 5 18:13:43 2009
New Revision: 63902
URL: http://llvm.org/viewvc/llvm-project?rev=63902&view=rev
Log:
Fix a crasher: we need to check that the function is non-null before using it!
Modified:
llvm/trunk/lib/Analysis/AliasAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/AliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasAnalysis.cpp?rev=63902&r1=63901&r2=63902&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/AliasAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/AliasAnalysis.cpp Thu Feb 5 18:13:43 2009
@@ -120,7 +120,7 @@
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;
More information about the llvm-commits
mailing list