OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1dcad96
)
Don't append ".b" to the names of globals that are being shrunk to booleans.
author
Nick Lewycky
<nicholas@mxc.ca>
Sat, 2 May 2009 16:21:50 +0000
(16:21 +0000)
committer
Nick Lewycky
<nicholas@mxc.ca>
Sat, 2 May 2009 16:21:50 +0000
(16:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70630
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/IPO/GlobalOpt.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/IPO/GlobalOpt.cpp
b/lib/Transforms/IPO/GlobalOpt.cpp
index
b804e2b
..
c46677d
100644
(file)
--- a/
lib/Transforms/IPO/GlobalOpt.cpp
+++ b/
lib/Transforms/IPO/GlobalOpt.cpp
@@
-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();