Remove special case in the DIEValue printing since it only existed
authorEric Christopher <echristo@gmail.com>
Thu, 6 Mar 2014 00:00:49 +0000 (00:00 +0000)
committerEric Christopher <echristo@gmail.com>
Thu, 6 Mar 2014 00:00:49 +0000 (00:00 +0000)
for verbose asm.

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

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index ba83b8b8d151f1b228fabeb2a9f16e6630a425e0..315c09f4dabbf832233ef29d610739d960f93a2f 100644 (file)
@@ -1996,8 +1996,12 @@ void DwarfDebug::emitDIE(DIE *Die) {
     dwarf::Form Form = AbbrevData[i].getForm();
     assert(Form && "Too many attributes for DIE (check abbreviation)");
 
-    if (Asm->isVerbose())
+    if (Asm->isVerbose()) {
       Asm->OutStreamer.AddComment(dwarf::AttributeString(Attr));
+      if (Attr == dwarf::DW_AT_accessibility)
+        Asm->OutStreamer.AddComment(dwarf::AccessibilityString(
+            cast<DIEInteger>(Values[i])->getValue()));
+    }
 
     switch (Attr) {
     case dwarf::DW_AT_abstract_origin:
@@ -2032,14 +2036,6 @@ void DwarfDebug::emitDIE(DIE *Die) {
       }
       break;
     }
-    case dwarf::DW_AT_accessibility: {
-      if (Asm->isVerbose()) {
-        DIEInteger *V = cast<DIEInteger>(Values[i]);
-        Asm->OutStreamer.AddComment(dwarf::AccessibilityString(V->getValue()));
-      }
-      Values[i]->EmitValue(Asm, Form);
-      break;
-    }
     default:
       // Emit an attribute using the defined form.
       Values[i]->EmitValue(Asm, Form);