[PATCH] DW_TAG_typedef and DW_TAG_structure_type not emitted when typedef is used

David Blaikie dblaikie at gmail.com
Wed Feb 26 10:33:03 PST 2014


On Thu, Jan 9, 2014 at 7:36 AM, jyoti allur <jyoti.yalamanchili at gmail.com>wrote:

>
>   This bug appears only when typedef is used.
>

Could you demonstrate this? My simple experiments seem to indicate that
this is not a typedef bug:

Removing the macro and typedef from your test case I still don't see
"struct S" emitted in Clang's DWARF:

+typedef struct S { int i; } *T;
+#define M(p) ((T) (p))
+
+void
+foo (void* p)
+{
+  M (p)->i++;
+}

$ clang++-tot typedef.cpp -g -c && llvm-dwarfdump typedef.o | grep DW_TAG
0x0000000b: DW_TAG_compile_unit [1] *
0x00000026:   DW_TAG_subprogram [2] *
0x00000044:     DW_TAG_formal_parameter [3]
0x00000053:   DW_TAG_pointer_type [4]


>
> http://llvm-reviews.chandlerc.com/D2498
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140226/72080e5f/attachment.html>


More information about the cfe-commits mailing list