[llvm] r203983 - Debug info: Unique types before emitting them to DWARF, where applicable.

Eric Christopher echristo at gmail.com
Mon Mar 17 00:16:50 PDT 2014


I've been reading the thread and I'm still uncertain what logic you
think is going on here - also the testcase isn't clear as to what
behavior you've changed there.

Could you explain more with the testcase what you're expecting to be
uniqued here?

-eric

On Fri, Mar 14, 2014 at 4:08 PM, Adrian Prantl <aprantl at apple.com> wrote:
> Author: adrian
> Date: Fri Mar 14 18:08:29 2014
> New Revision: 203983
>
> URL: http://llvm.org/viewvc/llvm-project?rev=203983&view=rev
> Log:
> Debug info: Unique types before emitting them to DWARF, where applicable.
>
> Modified:
>     llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
>     llvm/trunk/test/Linker/type-unique-odr-a.ll
>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=203983&r1=203982&r2=203983&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Fri Mar 14 18:08:29 2014
> @@ -958,6 +958,9 @@ DIE *DwarfUnit::getOrCreateTypeDIE(const
>    DIE *ContextDIE = getOrCreateContextDIE(Context);
>    assert(ContextDIE);
>
> +  // Unique the type. This is a noop if the type has no unique identifier.
> +  Ty = DIType(resolve(Ty.getRef()));
> +
>    DIE *TyDIE = getDIE(Ty);
>    if (TyDIE)
>      return TyDIE;
>
> Modified: llvm/trunk/test/Linker/type-unique-odr-a.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/type-unique-odr-a.ll?rev=203983&r1=203982&r2=203983&view=diff
> ==============================================================================
> --- llvm/trunk/test/Linker/type-unique-odr-a.ll (original)
> +++ llvm/trunk/test/Linker/type-unique-odr-a.ll Fri Mar 14 18:08:29 2014
> @@ -28,6 +28,10 @@
>  ; CHECK-NEXT:   DW_AT_MIPS_linkage_name {{.*}} "_ZL3barv"
>  ; CHECK:      DW_TAG_class_type
>  ; CHECK-NEXT:   DW_AT_name {{.*}} "A"
> +; CHECK-NOT:  DW_TAG
> +; CHECK:      DW_TAG_member
> +; CHECK-NEXT:   DW_AT_name {{.*}} "data"
> +; CHECK-NOT:  DW_TAG
>  ; CHECK:      DW_TAG_subprogram
>  ; CHECK-NEXT:   DW_AT_MIPS_linkage_name {{.*}} "_ZN1A6getFooEv"
>  ; CHECK-NEXT:   DW_AT_name {{.*}} "getFoo"
>
>
> _______________________________________________
> 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