summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.cpp
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
commit51cd00abaf0e9212f0508b12cc003a0cd02cfe64 (patch)
treee6da1587b029709028e283341b10baed09c7fe95 /lib/CodeGen/CodeGenModule.cpp
parentf68203224c237e3ca84553fc5dad52305cc3e048 (diff)
downloadclang-51cd00abaf0e9212f0508b12cc003a0cd02cfe64.tar.gz
clang-51cd00abaf0e9212f0508b12cc003a0cd02cfe64.tar.bz2
clang-51cd00abaf0e9212f0508b12cc003a0cd02cfe64.tar.xz
Use private linkage for utf-16 objc strings too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199709 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 7f77df00f2..95dd52c4d5 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/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.