mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-26 18:20:39 +00:00
Don't append ".b" to the names of globals that are being shrunk to booleans.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70630 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1549,10 +1549,12 @@ static bool TryToShrinkGlobalToBoolean(GlobalVariable *GV, Constant *OtherVal) {
|
|||||||
|
|
||||||
// Create the new global, initializing it to false.
|
// Create the new global, initializing it to false.
|
||||||
GlobalVariable *NewGV = new GlobalVariable(Type::Int1Ty, false,
|
GlobalVariable *NewGV = new GlobalVariable(Type::Int1Ty, false,
|
||||||
GlobalValue::InternalLinkage, ConstantInt::getFalse(),
|
GlobalValue::InternalLinkage,
|
||||||
GV->getName()+".b",
|
ConstantInt::getFalse(),
|
||||||
|
"",
|
||||||
(Module *)NULL,
|
(Module *)NULL,
|
||||||
GV->isThreadLocal());
|
GV->isThreadLocal());
|
||||||
|
NewGV->takeName(GV);
|
||||||
GV->getParent()->getGlobalList().insert(GV, NewGV);
|
GV->getParent()->getGlobalList().insert(GV, NewGV);
|
||||||
|
|
||||||
Constant *InitVal = GV->getInitializer();
|
Constant *InitVal = GV->getInitializer();
|
||||||
|
|||||||
Reference in New Issue
Block a user