[llvm-bugs] [Bug 26553] New: C++ Debug info should reference DW_TAG_template_type_parameter
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Feb 9 14:02:58 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=26553
Bug ID: 26553
Summary: C++ Debug info should reference
DW_TAG_template_type_parameter
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: aprantl at apple.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
The DWARF standard recommends the debug info for the following snippet:
Figure D.50: C++ template example #1: source
// C++ source
//
template <class T> struct wrapper {
T comp;
};
wrapper<int> obj;
to be emitted as:
! DWARF description
!
11$: DW_TAG_structure_type
DW_AT_name("wrapper")
12$: DW_TAG_template_type_parameter
DW_AT_name("T")
DW_AT_type(reference to "int")
13$: DW_TAG_member
DW_AT_name("comp")
DW_AT_type(reference to 12$)
^^^^^^^^^^^^^^^^
The type of comp is T.
14$: DW_TAG_variable
DW_AT_name("obj")
DW_AT_type(reference to 11$)
what clang r260113 is actually emitting is
0x00000034: TAG_structure_type [3] *
AT_name( "wrapper<int>" )
AT_byte_size( 0x04 )
AT_decl_file( "/private/tmp/template.cpp" )
AT_decl_line( 4 )
0x0000003c: TAG_member [4]
AT_name( "comp" )
AT_type( {0x00000054} ( int ) )
^^^^^
The type of comp is int.
AT_decl_file( "/private/tmp/template.cpp" )
AT_decl_line( 5 )
AT_data_member_location( +0 )
0x0000004a: TAG_template_type_parameter [5]
AT_type( {0x00000054} ( int ) )
AT_name( "T" )
0x00000053: NULL
0x00000054: TAG_base_type [6]
AT_name( "int" )
AT_encoding( DW_ATE_signed )
AT_byte_size( 0x04 )
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160209/f3c1fb83/attachment.html>
More information about the llvm-bugs
mailing list