summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-05-27 22:13:20 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-05-27 22:13:20 +0000
commit6ffb623a5209e4b59536f1be17e15d60127a8467 (patch)
treeff1937725e764d2ec0480a7362829d07cf8a5c10 /clang/lib/CodeGen/CodeGenModule.cpp
parentd23bfb8a7aa12dbea5c9fb382b3c1cbf5bffc51f (diff)
downloadbcm5719-llvm-6ffb623a5209e4b59536f1be17e15d60127a8467.tar.gz
bcm5719-llvm-6ffb623a5209e4b59536f1be17e15d60127a8467.zip
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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 987ebffd97d..de11a29f67b 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -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;
}
OpenPOWER on IntegriCloud