diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-03-24 00:17:40 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-03-24 00:17:40 +0000 |
commit | f1c0ae9de5365a578fbdfebe4625fb281b0be592 (patch) | |
tree | 2da6d58ba4016209ff0f030dcaef38a1fa0bc33a /lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp | |
parent | 16581bf931c0ccf2f8993397acfa4e1d509a68dc (diff) | |
download | external_llvm-f1c0ae9de5365a578fbdfebe4625fb281b0be592.zip external_llvm-f1c0ae9de5365a578fbdfebe4625fb281b0be592.tar.gz external_llvm-f1c0ae9de5365a578fbdfebe4625fb281b0be592.tar.bz2 |
Do not emit comments unless -asm-verbose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67580 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp')
-rw-r--r-- | lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp index 5da6d7a..2a6d776 100644 --- a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp +++ b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp @@ -239,7 +239,7 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) { I != E; ++I) { // Print a label for the basic block. if (!I->pred_empty()) { - printBasicBlockLabel(I, true, true); + printBasicBlockLabel(I, true, true, VerboseAsm); O << '\n'; } for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end(); @@ -315,7 +315,7 @@ void X86ATTAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo, O << MO.getImm(); return; case MachineOperand::MO_MachineBasicBlock: - printBasicBlockLabel(MO.getMBB()); + printBasicBlockLabel(MO.getMBB(), false, false, VerboseAsm); return; case MachineOperand::MO_JumpTableIndex: { bool isMemOp = Modifier && !strcmp(Modifier, "mem"); @@ -829,8 +829,11 @@ void X86ATTAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) { O << "\t.globl " << name << '\n' << TAI->getWeakDefDirective() << name << '\n'; EmitAlignment(Align, GVar); - O << name << ":\t\t\t\t" << TAI->getCommentString() << ' '; - PrintUnmangledNameSafely(GVar, O); + O << name << ":"; + if (VerboseAsm) { + O << name << "\t\t\t\t" << TAI->getCommentString() << ' '; + PrintUnmangledNameSafely(GVar, O); + } O << '\n'; EmitGlobalConstant(C); return; @@ -848,8 +851,10 @@ void X86ATTAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) { if (TAI->getCOMMDirectiveTakesAlignment()) O << ',' << (TAI->getAlignmentIsInBytes() ? (1 << Align) : Align); } - O << "\t\t" << TAI->getCommentString() << ' '; - PrintUnmangledNameSafely(GVar, O); + if (VerboseAsm) { + O << "\t\t" << TAI->getCommentString() << ' '; + PrintUnmangledNameSafely(GVar, O); + } O << '\n'; return; } @@ -887,8 +892,11 @@ void X86ATTAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) { } EmitAlignment(Align, GVar); - O << name << ":\t\t\t\t" << TAI->getCommentString() << ' '; - PrintUnmangledNameSafely(GVar, O); + O << name << ":"; + if (VerboseAsm){ + O << name << "\t\t\t\t" << TAI->getCommentString() << ' '; + PrintUnmangledNameSafely(GVar, O); + } O << '\n'; if (TAI->hasDotTypeDotSizeDirective()) O << "\t.size\t" << name << ", " << Size << '\n'; |