when emitting DIEs, emit the comment on the same line as the directive.
authorChris Lattner <sabre@nondot.org>
Sun, 24 Jan 2010 18:54:17 +0000 (18:54 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 24 Jan 2010 18:54:17 +0000 (18:54 +0000)
This fixes FrontendObjC/2009-11-30-Objc-ID.m

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94369 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index 513987f902037777fdccf26d193d914a79e3d2d8..4fe1b8512dcf14a9b8549a5c3ae105b716ccaf8c 100644 (file)
@@ -2366,6 +2366,9 @@ void DwarfDebug::emitDIE(DIE *Die) {
     unsigned Form = AbbrevData[i].getForm();
     assert(Form && "Too many attributes for DIE (check abbreviation)");
 
+    if (Asm->VerboseAsm)
+      Asm->OutStreamer.AddComment(dwarf::AttributeString(Attr));
+    
     switch (Attr) {
     case dwarf::DW_AT_sibling:
       Asm->EmitInt32(Die->getSiblingOffset());
@@ -2382,8 +2385,6 @@ void DwarfDebug::emitDIE(DIE *Die) {
       Values[i]->EmitValue(this, Form);
       break;
     }
-
-    EOL(dwarf::AttributeString(Attr));
   }
 
   // Emit the DIE children if any.