teach andersens about undef

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20881 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-03-27 18:58:23 +00:00
parent 5f4c0a88ee
commit 267a1b02a2

View File

@ -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);