code cleanup
authorChris Lattner <sabre@nondot.org>
Fri, 7 Aug 2009 23:42:01 +0000 (23:42 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 7 Aug 2009 23:42:01 +0000 (23:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78432 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/AsmPrinter.cpp

index 433590c7f998cece2cf10136cdc78bf04b722cf6..a8cb465564befc56da3398288e523b9a1723f8d4 100644 (file)
@@ -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