From 431f97e4f0f43d4493f7b949d16f954fa5f77f64 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Sun, 3 May 2009 03:49:08 +0000 Subject: [PATCH] Revert r70630. Go back to appending ".b" to internal globals when shrinking them to bool. llvm-svn: 70653 --- llvm/lib/Transforms/IPO/GlobalOpt.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp index c46677dcdf74..b804e2b35876 100644 --- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp +++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp @@ -1549,12 +1549,10 @@ 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(), - "", + GlobalValue::InternalLinkage, ConstantInt::getFalse(), + GV->getName()+".b", (Module *)NULL, GV->isThreadLocal()); - NewGV->takeName(GV); GV->getParent()->getGlobalList().insert(GV, NewGV); Constant *InitVal = GV->getInitializer();