diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp index 9c17cab0e62..ed9d54953e1 100644 --- a/lib/Analysis/IPA/Andersens.cpp +++ b/lib/Analysis/IPA/Andersens.cpp @@ -578,7 +578,8 @@ Andersens::Node *Andersens::getNodeForConstantPointerTarget(Constant *C) { void Andersens::AddGlobalInitializerConstraints(Node *N, Constant *C) { if (C->getType()->isFirstClassType()) { if (isa(C->getType())) - N->addPointerTo(getNodeForConstantPointer(C)); + N->copyFrom(getNodeForConstantPointer(C)); + } else if (C->isNullValue()) { N->addPointerTo(&GraphNodes[NullObject]); return;