diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-01-17 16:31:00 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-01-17 16:31:00 +0000 |
| commit | e79d43da3b4b544e4482c4466853a7c94ef72b13 (patch) | |
| tree | 8646c7c0831e7575ed99d0216f2f0b171478035f /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | b74799090a56026b3b67bcfaf896c7fc326bd07d (diff) | |
| download | llvm-e79d43da3b4b544e4482c4466853a7c94ef72b13.zip llvm-e79d43da3b4b544e4482c4466853a7c94ef72b13.tar.gz llvm-e79d43da3b4b544e4482c4466853a7c94ef72b13.tar.bz2 | |
Add unnamed_addr to the special strings created by
__builtin___CFStringMakeConstantString
This fixes PR8993. A darwin expert might want to check that this is safe.
llvm-svn: 123658
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index df90011..8ae31f7 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1589,6 +1589,7 @@ CodeGenModule::GetAddrOfConstantCFString(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()); |
