diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-07 23:42:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-07 23:42:01 +0000 |
commit | 5f51cd057984b89e0dc0812d45d512596a3c6596 (patch) | |
tree | 3166bd31785a3d9a6659b40da479bcee60b39c5c | |
parent | fadf13128f3eb4675068f130cb1f6e0d8a46ac19 (diff) |
code cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78432 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 433590c7f9..a8cb465564 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1687,27 +1687,25 @@ GCMetadataPrinter *AsmPrinter::GetOrCreateGCPrinter(GCStrategy *S) { } /// EmitComments - Pretty-print comments for instructions -void AsmPrinter::EmitComments(const MachineInstr &MI) const -{ - if (VerboseAsm) { - if (!MI.getDebugLoc().isUnknown()) { - DebugLocTuple DLT = MF->getDebugLocTuple(MI.getDebugLoc()); - - // Print source line info - O.PadToColumn(TAI->getCommentColumn(), 1); - O << TAI->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 MachineInstr &MI) const { + if (!VerboseAsm || + MI.getDebugLoc().isUnknown()) + return; + + DebugLocTuple DLT = MF->getDebugLocTuple(MI.getDebugLoc()); + + // Print source line info + O.PadToColumn(TAI->getCommentColumn(), 1); + O << TAI->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; } /// EmitComments - Pretty-print comments for instructions |