summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-01-21 02:57:56 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-01-21 02:57:56 +0000
commite1bd71fea4422c5fba8d908a132dd857487768b2 (patch)
tree4742984942e2a6c7d788c68cda85b7c360a1b6d2 /clang/lib/CodeGen
parent9f0a21efbb5462cf7611762fe7ded6eed2e1aef5 (diff)
downloadbcm5719-llvm-e1bd71fea4422c5fba8d908a132dd857487768b2.tar.gz
bcm5719-llvm-e1bd71fea4422c5fba8d908a132dd857487768b2.zip
Use private linkage for utf-16 objc strings too.
llvm-svn: 199709
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 7f77df00f2c..95dd52c4d58 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -2378,18 +2378,11 @@ CodeGenModule::GetAddrOfConstantCFString(const StringLiteral *Literal) {
C = llvm::ConstantDataArray::getString(VMContext, Entry.getKey());
}
- llvm::GlobalValue::LinkageTypes Linkage;
- if (isUTF16)
- // FIXME: why do utf strings get "_" labels instead of "L" labels?
- Linkage = llvm::GlobalValue::InternalLinkage;
- else
- Linkage = llvm::GlobalValue::PrivateLinkage;
-
// Note: -fwritable-strings doesn't make the backing store strings of
// CFStrings writable. (See <rdar://problem/10657500>)
llvm::GlobalVariable *GV =
- new llvm::GlobalVariable(getModule(), C->getType(), /*isConstant=*/true,
- Linkage, C, ".str");
+ new llvm::GlobalVariable(getModule(), C->getType(), /*isConstant=*/true,
+ llvm::GlobalValue::PrivateLinkage, C, ".str");
GV->setUnnamedAddr(true);
// Don't enforce the target's minimum global alignment, since the only use
// of the string is via this class initializer.
OpenPOWER on IntegriCloud