summaryrefslogtreecommitdiff
path: root/lib/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-29 17:44:52 +0000
committerChris Lattner <sabre@nondot.org>2005-03-29 17:44:52 +0000
commitcfba7981eb119488788f5d35cb50f36a65acd8a8 (patch)
tree9303bc017c5675794e31bb059a8f7d874c497f46 /lib/Analysis
parent76bc5ce5c4869408bc81ba40c8bde055a2047af0 (diff)
there is no point comparing against null pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/AliasAnalysisEvaluator.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Analysis/AliasAnalysisEvaluator.cpp b/lib/Analysis/AliasAnalysisEvaluator.cpp
index 593dbedea80..c4ec8db3e1c 100644
--- a/lib/Analysis/AliasAnalysisEvaluator.cpp
+++ b/lib/Analysis/AliasAnalysisEvaluator.cpp
@@ -17,10 +17,11 @@
//
//===----------------------------------------------------------------------===//
+#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);