mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-09 13:33:17 +00:00
Fix an over aggressive assumption that struct decls will have a pointer to
an array that is empty. Instead of requiring this array, allow a null pointer. This shrinks all forward references of structs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58959 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3b78185a18
commit
4d557e4872
@ -363,7 +363,7 @@ public:
|
||||
Field.resize(0);
|
||||
Constant *C = CI->getOperand(I++);
|
||||
GlobalVariable *GV = getGlobalVariable(C);
|
||||
if (GV->hasInitializer()) {
|
||||
if (GV && GV->hasInitializer()) {
|
||||
if (ConstantArray *CA = dyn_cast<ConstantArray>(GV->getInitializer())) {
|
||||
for (unsigned i = 0, N = CA->getNumOperands(); i < N; ++i) {
|
||||
GlobalVariable *GVE = getGlobalVariable(CA->getOperand(i));
|
||||
|
Loading…
x
Reference in New Issue
Block a user