summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-27 18:58:23 +0000
committerChris Lattner <sabre@nondot.org>2005-03-27 18:58:23 +0000
commit267a1b02a2e0143c2b4bac11253f32fb1bf6fa7d (patch)
treefae2223474424100a25723a4a474ed691f3bab5a
parent5f4c0a88ee862e87cc9c59bf3bdaf7f13215416e (diff)
teach andersens about undef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20881 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Analysis/IPA/Andersens.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp
index 12d4cf5d4cd..12efb46c373 100644
--- a/lib/Analysis/IPA/Andersens.cpp
+++ b/lib/Analysis/IPA/Andersens.cpp
@@ -481,7 +481,7 @@ void Andersens::IdentifyObjects(Module &M) {
Andersens::Node *Andersens::getNodeForConstantPointer(Constant *C) {
assert(isa<PointerType>(C->getType()) && "Not a constant pointer!");
- if (isa<ConstantPointerNull>(C))
+ if (isa<ConstantPointerNull>(C) || isa<UndefValue>(C))
return &GraphNodes[NullPtr];
else if (GlobalValue *GV = dyn_cast<GlobalValue>(C))
return getNode(GV);