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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user