merge strings created by

const NSConstantString *appKey =  @"MyApp";

llvm-svn: 123680
This commit is contained in:
Rafael Espindola
2011-01-17 22:11:21 +00:00
parent 6760a51739
commit de089d462c
2 changed files with 7 additions and 0 deletions

View File

@@ -1681,6 +1681,7 @@ CodeGenModule::GetAddrOfConstantString(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());