Hi Adrian,<br><br>Unfortunately I'm going to object to this patch at the moment. We've not discussed it and the documentation hasn't been updated - especially as it is part of an ongoing standardization effort. Also it changes the documented contents of the table and so should possibly have changed the version number (though with standardization we may need to have a separate format).<div>
<br></div><div>Please revert and let's discuss this. FWIW I'm not necessarily against it but it does greatly increase the size of the table which is why we hadn't included them in the first place.</div><div><br>
</div><div>To start the discussion along those lines, gcc only includes them in the pubnames table if one of the actual enumerators has been referenced, otherwise it leaves it out.</div><div><br></div><div>Thanks.</div><div>
<br></div><div>-eric</div><br><div>On Mon Dec 23 2013 at 3:55:57 PM, Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>> wrote:</div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: adrian<br>
Date: Mon Dec 23 17:50:20 2013<br>
New Revision: 197927<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=197927&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>pr<u></u>oject?rev=197927&view=rev</a><br>
Log:<br>
Debug info: Add enumerators to the __apple_names accelerator table.<br>
rdar://problem/11516681.<br>
<br>
Modified:<br>
    llvm/trunk/lib/CodeGen/<u></u>AsmPrin<u></u>ter/DwarfUnit.cpp<br>
    llvm/trunk/test/DebugInfo/X86/<u></u><u></u>enum-class.ll<br>
<br>
Modified: llvm/trunk/lib/CodeGen/<u></u>AsmPrin<u></u>ter/DwarfUnit.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=197927&r1=197926&r2=197927&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>pr<u></u>oject/llvm/trunk/lib/<u></u>CodeGen/<u></u>AsmPrinter/DwarfUnit.<u></u>cpp?rev=<u></u>197927&r1=197926&r2=<u></u>197927&<u></u>view=diff</a><br>

==============================<u></u><u></u>==============================<u></u><u></u>==================<br>
--- llvm/trunk/lib/CodeGen/<u></u>AsmPrin<u></u>ter/DwarfUnit.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/<u></u>AsmPrin<u></u>ter/DwarfUnit.cpp Mon Dec 23 17:50:20 2013<br>
@@ -1773,6 +1773,9 @@ void DwarfUnit::<u></u>constructEnumTypeDI<u></u>E(DIE<br>
       int64_t Value = Enum.getEnumValue();<br>
       addSInt(Enumerator, dwarf::DW_AT_const_value, dwarf::DW_FORM_sdata,<br>
               Value);<br>
+<br>
+      // Add the enumerator to the __apple_names accelerator table.<br>
+      addAccelName(Name, Enumerator);<br>
     }<br>
   }<br>
   DIType DTy = resolve(CTy.<u></u>getTypeDerivedFrom<u></u>());<br>
<br>
Modified: llvm/trunk/test/DebugInfo/X86/<u></u><u></u>enum-class.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/enum-class.ll?rev=197927&r1=197926&r2=197927&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>pr<u></u>oject/llvm/trunk/test/<u></u>DebugInf<u></u>o/X86/enum-class.ll?<u></u>rev=<u></u>197927&r1=197926&r2=<u></u>197927&<u></u>view=diff</a><br>

==============================<u></u><u></u>==============================<u></u><u></u>==================<br>
--- llvm/trunk/test/DebugInfo/X86/<u></u><u></u>enum-class.ll (original)<br>
+++ llvm/trunk/test/DebugInfo/X86/<u></u><u></u>enum-class.ll Mon Dec 23 17:50:20 2013<br>
@@ -1,6 +1,17 @@<br>
 ; RUN: llc -O0 -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj<br>
 ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s<br>
<br>
+; Also test that the enumerators show up in the __apple_names accelerator table.<br>
+; RUN: llc -O0 -mtriple=x86_64-apple-darwin -filetype=asm < %s -o - | FileCheck --check-prefix=ACCEL-CHECK %s<br>
+; ACCEL-CHECK: .section        __DWARF,__apple_names,<u></u>regular,<u></u>debug<br>
+; ACCEL-CHECK-NOT: .section<br>
+; ACCEL-CHECK: A1<br>
+; ACCEL-CHECK-NOT: .section<br>
+; ACCEL-CHECK: C1<br>
+; ACCEL-CHECK-NOT: .section<br>
+; ACCEL-CHECK: B1<br>
+<br>
+<br>
 @a = global i32 0, align 4<br>
 @b = global i64 0, align 8<br>
 @c = global i32 0, align 4<br>
<br>
<br>
______________________________<u></u><u></u>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailm<u></u>an/listinfo/llvm-commits</a><br>
</blockquote>