aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-01-17 22:11:21 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-01-17 22:11:21 +0000
commit803d307a5385059b1a84dfe9706ab158c80a20dc (patch)
tree57c321081d5b7e8b6c113508d03c6be65bc7a7b8 /lib/CodeGen/CodeGenModule.cpp
parent0f565591bcc0685181d7037fe9db60a31d29b9c9 (diff)
merge strings created by
const NSConstantString *appKey = @"MyApp"; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 8ae31f7750..0564372a4e 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -1681,6 +1681,7 @@ CodeGenModule::GetAddrOfConstantString(const StringLiteral *Literal) {
llvm::GlobalVariable *GV =
new llvm::GlobalVariable(getModule(), C->getType(), isConstant, Linkage, C,
".str");
+ GV->setUnnamedAddr(true);
if (isUTF16) {
CharUnits Align = getContext().getTypeAlignInChars(getContext().ShortTy);
GV->setAlignment(Align.getQuantity());