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:
Nick Lewycky 2009-05-02 16:21:50 +00:00
parent 1dcad96dc6
commit 0e80b7cda1

View File

@ -1549,10 +1549,12 @@ static bool TryToShrinkGlobalToBoolean(GlobalVariable *GV, Constant *OtherVal) {
// Create the new global, initializing it to false.
GlobalVariable *NewGV = new GlobalVariable(Type::Int1Ty, false,
GlobalValue::InternalLinkage, ConstantInt::getFalse(),
GV->getName()+".b",
GlobalValue::InternalLinkage,
ConstantInt::getFalse(),
"",
(Module *)NULL,
GV->isThreadLocal());
NewGV->takeName(GV);
GV->getParent()->getGlobalList().insert(GV, NewGV);
Constant *InitVal = GV->getInitializer();