[llvm-commits] [llvm] r79798 - /llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Chris Lattner
sabre at nondot.org
Sat Aug 22 17:51:48 PDT 2009
Author: lattner
Date: Sat Aug 22 19:51:47 2009
New Revision: 79798
URL: http://llvm.org/viewvc/llvm-project?rev=79798&view=rev
Log:
random code cleanups.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=79798&r1=79797&r2=79798&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Sat Aug 22 19:51:47 2009
@@ -1751,27 +1751,25 @@
}
/// 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());
-
- // 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;
- }
+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;
}
/// PrintChildLoopComment - Print comments about child loops within
More information about the llvm-commits
mailing list