From dccbb28bca493c1998048f3ae4f52c684fdc9bed Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 19 Jan 2010 04:48:20 +0000 Subject: add a bool for whether .lcomm takes an alignment instead of basing this on "isdarwin". llvm-svn: 93852 --- llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp') 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); -- cgit v1.2.3