Match llvm-gcc's string literals alignment by forcing alignment on string literals to 1. This can significantly impact the size of the string data, and as far as I know, the alignment doesn't help performance. rdar://9078969 .

llvm-svn: 132223
This commit is contained in:
Eli Friedman
2011-05-27 22:13:20 +00:00
parent d23bfb8a7a
commit 6ffb623a52
2 changed files with 3 additions and 2 deletions

View File

@@ -1899,6 +1899,7 @@ static llvm::Constant *GenerateStringLiteral(llvm::StringRef str,
new llvm::GlobalVariable(CGM.getModule(), C->getType(), constant,
llvm::GlobalValue::PrivateLinkage,
C, GlobalName);
GV->setAlignment(1);
GV->setUnnamedAddr(true);
return GV;
}