summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);