diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-19 06:01:04 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-19 06:01:04 +0000 |
commit | 95b98959b0e44a08c3ede444b30f4193ecc3900c (patch) | |
tree | 214920de875b45d9bd53090b143da273914f3e61 /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | 282466abf7f573d7f19c2bbf7cd56f6dda19f08b (diff) | |
download | bcm5719-llvm-95b98959b0e44a08c3ede444b30f4193ecc3900c.tar.gz bcm5719-llvm-95b98959b0e44a08c3ede444b30f4193ecc3900c.zip |
mc'ize some stuff, don't comment out .lcomm directive in -fverbose-asm mode.
llvm-svn: 93860
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 3e54f0992a5..bdebcd6eb86 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -169,26 +169,23 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) { O.PadToColumn(MAI->getCommentColumn()); O << MAI->getCommentString() << ' '; WriteAsOperand(O, GV, /*PrintType=*/false, GV->getParent()); + O << '\n'; } if (GVKind.isCommon()) { // .comm _foo, 42, 4 - O << MAI->getCOMMDirective() << *GVSym << ',' << Size; - if (MAI->getCOMMDirectiveTakesAlignment()) - O << ',' << (MAI->getAlignmentIsInBytes() ? (1 << AlignLog) : AlignLog); + OutStreamer.EmitCommonSymbol(GVSym, Size, 1 << AlignLog); } else if (const char *LComm = MAI->getLCOMMDirective()) { // .lcomm _foo, 42, 4 O << LComm << *GVSym << ',' << Size; if (MAI->getLCOMMDirectiveTakesAlignment()) O << ',' << AlignLog; + O << '\n'; } else { // .local _foo O << "\t.local\t" << *GVSym << '\n'; // .comm _foo, 42, 4 - O << MAI->getCOMMDirective() << *GVSym << ',' << Size; - if (MAI->getCOMMDirectiveTakesAlignment()) - O << ',' << (MAI->getAlignmentIsInBytes() ? (1 << AlignLog) : AlignLog); + OutStreamer.EmitCommonSymbol(GVSym, Size, 1 << AlignLog); } - O << '\n'; return; } |