summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-09-07 21:08:01 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-09-07 21:08:01 +0000
commit68b9f0583f6af28c4912367899e4156edee3c3d0 (patch)
treed21d85fdc8f62496a06b06fd2fb3c34f8e933bc3 /llvm/lib/CodeGen/AsmPrinter
parent2c39b77f894579c367e8b4dd640193a7d92aa876 (diff)
downloadbcm5719-llvm-68b9f0583f6af28c4912367899e4156edee3c3d0.tar.gz
bcm5719-llvm-68b9f0583f6af28c4912367899e4156edee3c3d0.zip
Fix alignment of .comm and .lcomm on mingw32.
For some reason .lcomm uses byte alignment and .comm log2 alignment so we can't use the same setting for both. Fix this by reintroducing the LCOMM enum. I verified this against mingw's gcc. llvm-svn: 163420
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 2aae37696ba..d6d45104098 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -312,7 +312,8 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
return;
}
- if (Align == 1 || MAI->getLCOMMDirectiveSupportsAlignment()) {
+ if (Align == 1 ||
+ MAI->getLCOMMDirectiveAlignmentType() != LCOMM::NoAlignment) {
// .lcomm _foo, 42
OutStreamer.EmitLocalCommonSymbol(GVSym, Size, Align);
return;
OpenPOWER on IntegriCloud