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 | 4ed5438f4882c9fe779b1a8ff546877889b222df (patch) | |
tree | e5ee7d00d25375df4dcc46eae3c7d003592a91fc /lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | 9744d611d7c7c1fb51c50c4e94901e4e9a905116 (diff) | |
download | external_llvm-4ed5438f4882c9fe779b1a8ff546877889b222df.tar.gz external_llvm-4ed5438f4882c9fe779b1a8ff546877889b222df.tar.bz2 external_llvm-4ed5438f4882c9fe779b1a8ff546877889b222df.zip |
mc'ize some stuff, don't comment out .lcomm directive in -fverbose-asm mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93860 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 3e54f0992a..bdebcd6eb8 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/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; } |