mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-19 06:31:18 +00:00
Fix the regressions handling unnamed global variables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14870 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b406eadfe3
commit
a2d4b3cfeb
@ -561,6 +561,7 @@ static void ParseGlobalVariable(char *NameStr,GlobalValue::LinkageTypes Linkage,
|
|||||||
GV->setInitializer(Initializer);
|
GV->setInitializer(Initializer);
|
||||||
GV->setLinkage(Linkage);
|
GV->setLinkage(Linkage);
|
||||||
GV->setConstant(isConstantGlobal);
|
GV->setConstant(isConstantGlobal);
|
||||||
|
InsertValue(GV, CurModule.Values);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -595,8 +596,10 @@ static void ParseGlobalVariable(char *NameStr,GlobalValue::LinkageTypes Linkage,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise there is no existing GV to use, create one now.
|
// Otherwise there is no existing GV to use, create one now.
|
||||||
new GlobalVariable(Ty, isConstantGlobal, Linkage, Initializer, Name,
|
GlobalVariable *GV =
|
||||||
CurModule.CurrentModule);
|
new GlobalVariable(Ty, isConstantGlobal, Linkage, Initializer, Name,
|
||||||
|
CurModule.CurrentModule);
|
||||||
|
InsertValue(GV, CurModule.Values);
|
||||||
}
|
}
|
||||||
|
|
||||||
// setTypeName - Set the specified type to the name given. The name may be
|
// setTypeName - Set the specified type to the name given. The name may be
|
||||||
|
Loading…
x
Reference in New Issue
Block a user