mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Fix a major problem with global variable initializers. This could cause
us to have stuff pointing to the null pointer, which makes no sense (the null ptr is an ssa value, not the null object) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20922 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -578,7 +578,8 @@ Andersens::Node *Andersens::getNodeForConstantPointerTarget(Constant *C) {
|
||||
void Andersens::AddGlobalInitializerConstraints(Node *N, Constant *C) {
|
||||
if (C->getType()->isFirstClassType()) {
|
||||
if (isa<PointerType>(C->getType()))
|
||||
N->addPointerTo(getNodeForConstantPointer(C));
|
||||
N->copyFrom(getNodeForConstantPointer(C));
|
||||
|
||||
} else if (C->isNullValue()) {
|
||||
N->addPointerTo(&GraphNodes[NullObject]);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user