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
This commit is contained in:
Rafael Espindola
2011-01-17 16:31:00 +00:00
parent b74799090a
commit e79d43da3b
2 changed files with 5 additions and 4 deletions

View File

@@ -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());