[llvm] r197927 - Debug info: Add enumerators to the __apple_names accelerator table.

Eric Christopher echristo at gmail.com
Thu Aug 14 10:25:38 PDT 2014


Since this has come up I'll ping this thread. You were going to
discuss elements with the lldb folks here and talk to me about what's
changed such that the size of the table isn't as important as it once
was. Also, see my comment on pubnames below.

Again, I don't object to the idea, merely that this patch needs more
than just adding them in.

-eric

On Fri, Dec 27, 2013 at 3:23 PM, Eric Christopher <echristo at gmail.com> wrote:
> Hi Adrian,
>
> 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).
>
> 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.
>
> 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.
>
> Thanks.
>
> -eric
>
> On Mon Dec 23 2013 at 3:55:57 PM, Adrian Prantl <aprantl at apple.com> wrote:
>
> Author: adrian
> Date: Mon Dec 23 17:50:20 2013
> New Revision: 197927
>
> URL: http://llvm.org/viewvc/llvm-project?rev=197927&view=rev
> Log:
> Debug info: Add enumerators to the __apple_names accelerator table.
> rdar://problem/11516681.
>
> Modified:
>     llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
>     llvm/trunk/test/DebugInfo/X86/enum-class.ll
>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=197927&r1=197926&r2=197927&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Mon Dec 23 17:50:20 2013
> @@ -1773,6 +1773,9 @@ void DwarfUnit::constructEnumTypeDIE(DIE
>        int64_t Value = Enum.getEnumValue();
>        addSInt(Enumerator, dwarf::DW_AT_const_value, dwarf::DW_FORM_sdata,
>                Value);
> +
> +      // Add the enumerator to the __apple_names accelerator table.
> +      addAccelName(Name, Enumerator);
>      }
>    }
>    DIType DTy = resolve(CTy.getTypeDerivedFrom());
>
> Modified: llvm/trunk/test/DebugInfo/X86/enum-class.ll
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/enum-class.ll?rev=197927&r1=197926&r2=197927&view=diff
> ==============================================================================
> --- llvm/trunk/test/DebugInfo/X86/enum-class.ll (original)
> +++ llvm/trunk/test/DebugInfo/X86/enum-class.ll Mon Dec 23 17:50:20 2013
> @@ -1,6 +1,17 @@
>  ; RUN: llc -O0 -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj
>  ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
>
> +; Also test that the enumerators show up in the __apple_names accelerator
> table.
> +; RUN: llc -O0 -mtriple=x86_64-apple-darwin -filetype=asm < %s -o - |
> FileCheck --check-prefix=ACCEL-CHECK %s
> +; ACCEL-CHECK: .section        __DWARF,__apple_names,regular,debug
> +; ACCEL-CHECK-NOT: .section
> +; ACCEL-CHECK: A1
> +; ACCEL-CHECK-NOT: .section
> +; ACCEL-CHECK: C1
> +; ACCEL-CHECK-NOT: .section
> +; ACCEL-CHECK: B1
> +
> +
>  @a = global i32 0, align 4
>  @b = global i64 0, align 8
>  @c = global i32 0, align 4
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list