mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +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:
parent
848132d671
commit
76bc5ce5c4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user