diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-23 00:51:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-23 00:51:47 +0000 |
commit | fd90b168bae3f852639ca27f56e9345daefc9d5a (patch) | |
tree | 9d82f63e4e520c55d568b1d7e236176f05d4ba5f /llvm/lib/CodeGen/AsmPrinter | |
parent | 81e8e02e2fa89a891e2128d0bc9aba9310760f06 (diff) | |
download | bcm5719-llvm-fd90b168bae3f852639ca27f56e9345daefc9d5a.tar.gz bcm5719-llvm-fd90b168bae3f852639ca27f56e9345daefc9d5a.zip |
random code cleanups.
llvm-svn: 79798
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index d2afe1e46dd..c3175dd6750 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1751,27 +1751,25 @@ void AsmPrinter::EmitComments(const MachineInstr &MI) const { } /// EmitComments - Pretty-print comments for instructions -void AsmPrinter::EmitComments(const MCInst &MI) const -{ - if (VerboseAsm) { - if (!MI.getDebugLoc().isUnknown()) { - DebugLocTuple DLT = MF->getDebugLocTuple(MI.getDebugLoc()); +void AsmPrinter::EmitComments(const MCInst &MI) const { + if (!VerboseAsm || + MI.getDebugLoc().isUnknown()) + return; + + DebugLocTuple DLT = MF->getDebugLocTuple(MI.getDebugLoc()); - // Print source line info - O.PadToColumn(MAI->getCommentColumn()); - O << MAI->getCommentString() << " SrcLine "; - if (DLT.CompileUnit->hasInitializer()) { - Constant *Name = DLT.CompileUnit->getInitializer(); - if (ConstantArray *NameString = dyn_cast<ConstantArray>(Name)) - if (NameString->isString()) { - O << NameString->getAsString() << " "; - } - } - O << DLT.Line; - if (DLT.Col != 0) - O << ":" << DLT.Col; - } + // Print source line info + O.PadToColumn(MAI->getCommentColumn()); + O << MAI->getCommentString() << " SrcLine "; + if (DLT.CompileUnit->hasInitializer()) { + Constant *Name = DLT.CompileUnit->getInitializer(); + if (ConstantArray *NameString = dyn_cast<ConstantArray>(Name)) + if (NameString->isString()) + O << NameString->getAsString() << " "; } + O << DLT.Line; + if (DLT.Col != 0) + O << ":" << DLT.Col; } /// PrintChildLoopComment - Print comments about child loops within |