diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-01-19 04:48:20 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-01-19 04:48:20 +0000 |
| commit | dccbb28bca493c1998048f3ae4f52c684fdc9bed (patch) | |
| tree | 357f46c3f222598cb127f41bc1039e9e8f18e130 /llvm/lib/Target/ARM | |
| parent | 6a160517a0690fc9ddda4511174e08d8d5557821 (diff) | |
| download | bcm5719-llvm-dccbb28bca493c1998048f3ae4f52c684fdc9bed.tar.gz bcm5719-llvm-dccbb28bca493c1998048f3ae4f52c684fdc9bed.zip | |
add a bool for whether .lcomm takes an alignment instead of basing this on "isdarwin".
llvm-svn: 93852
Diffstat (limited to 'llvm/lib/Target/ARM')
| -rw-r--r-- | llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp index b1c1f55f17f..4485ad75efc 100644 --- a/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp +++ b/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp @@ -1202,14 +1202,12 @@ void ARMAsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) { if (GVKind.isBSSLocal()) { if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it. - if (isDarwin) { - O << MAI->getLCOMMDirective() << *GVarSym << ',' << Size - << ',' << Align; - } else if (MAI->getLCOMMDirective() != NULL) { - O << MAI->getLCOMMDirective() << *GVarSym << "," << Size; + if (const char *LCOMM = MAI->getLCOMMDirective()) { + O << LCOMM << *GVarSym << "," << Size; + if (MAI->getLCOMMDirectiveTakesAlignment()) + O << ',' << Align; } else { - if (GVar->hasLocalLinkage()) - O << "\t.local\t" << *GVarSym << '\n'; + O << "\t.local\t" << *GVarSym << '\n'; O << MAI->getCOMMDirective() << *GVarSym << "," << Size; if (MAI->getCOMMDirectiveTakesAlignment()) O << "," << (MAI->getAlignmentIsInBytes() ? (1 << Align) : Align); |

