aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-03-24 00:17:40 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-03-24 00:17:40 +0000
commit11db8142e9de9bec53cf8dda1a2ac5eb85796805 (patch)
tree2da6d58ba4016209ff0f030dcaef38a1fa0bc33a /lib/Target/ARM
parentdb0d867d9639be997eb8734a101505eb8fbc3b2f (diff)
downloadexternal_llvm-11db8142e9de9bec53cf8dda1a2ac5eb85796805.zip
external_llvm-11db8142e9de9bec53cf8dda1a2ac5eb85796805.tar.gz
external_llvm-11db8142e9de9bec53cf8dda1a2ac5eb85796805.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/ARM')
-rw-r--r--lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
index 816940b..5da7e9e 100644
--- a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
@@ -255,7 +255,7 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
I != E; ++I) {
// Print a label for the basic block.
if (I != MF.begin()) {
- printBasicBlockLabel(I, true, true);
+ printBasicBlockLabel(I, true, true, VerboseAsm);
O << '\n';
}
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
@@ -356,7 +356,9 @@ static void printSOImm(raw_ostream &O, int64_t V, const TargetAsmInfo *TAI) {
if (Rot) {
O << "#" << Imm << ", " << Rot;
// Pretty printed version.
- O << ' ' << TAI->getCommentString() << ' ' << (int)ARM_AM::rotr32(Imm, Rot);
+ if (VerboseAsm)
+ O << ' ' << TAI->getCommentString()
+ << ' ' << (int)ARM_AM::rotr32(Imm, Rot);
} else {
O << "#" << Imm;
}
@@ -870,8 +872,11 @@ void ARMAsmPrinter::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 << "\t\t\t\t" << TAI->getCommentString() << ' ';
+ PrintUnmangledNameSafely(GVar, O);
+ }
O << '\n';
EmitGlobalConstant(C);
return;
@@ -892,8 +897,10 @@ void ARMAsmPrinter::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;
}
@@ -928,8 +935,11 @@ void ARMAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) {
}
EmitAlignment(Align, GVar);
- O << name << ":\t\t\t\t" << TAI->getCommentString() << " ";
- PrintUnmangledNameSafely(GVar, O);
+ O << name << ":";
+ if (VerboseAsm) {
+ O << "\t\t\t\t" << TAI->getCommentString() << " ";
+ PrintUnmangledNameSafely(GVar, O);
+ }
O << "\n";
if (TAI->hasDotTypeDotSizeDirective())
O << "\t.size " << name << ", " << Size << "\n";