there is no point comparing against null pointer.
authorChris Lattner <sabre@nondot.org>
Tue, 29 Mar 2005 17:44:52 +0000 (17:44 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 29 Mar 2005 17:44:52 +0000 (17:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20925 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/AliasAnalysisEvaluator.cpp

index 593dbedea80091cd8cc2e8445f5519f1c5846076..c4ec8db3e1c78e778bd94e25f252b0736488ecd5 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
+#include "llvm/Constants.h"
+#include "llvm/DerivedTypes.h"
 #include "llvm/Function.h"
 #include "llvm/Instructions.h"
 #include "llvm/Pass.h"
-#include "llvm/DerivedTypes.h"
 #include "llvm/Analysis/Passes.h"
 #include "llvm/Analysis/AliasAnalysis.h"
 #include "llvm/Assembly/Writer.h"
@@ -115,7 +116,7 @@ bool AAEval::runOnFunction(Function &F) {
         isa<Function>(Inst.getOperand(0)))
       ++OI;  // Skip actual functions for direct function calls.
     for (; OI != Inst.op_end(); ++OI)
-      if (isa<PointerType>((*OI)->getType()))
+      if (isa<PointerType>((*OI)->getType()) && !isa<ConstantPointerNull>(*OI))
         Pointers.insert(*OI);
 
     CallSite CS = CallSite::get(&*I);