aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-19 04:48:20 +0000
committerChris Lattner <sabre@nondot.org>2010-01-19 04:48:20 +0000
commit7517b249caa793a9a01e4b6aff9c47fd88a153cc (patch)
treec47754566cceb82f78370f52b59afa1a438e8cf2 /lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
parent48d64ba9d846229339b2431b298620cb8a01ffc5 (diff)
add a bool for whether .lcomm takes an alignment instead of basing this on "isdarwin".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93852 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp')
-rw-r--r--lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
index b1c1f55f17..4485ad75ef 100644
--- a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
+++ b/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);