On Wed, Feb 26, 2014 at 10:33 AM, David Blaikie <[email protected]> wrote:

>
>
>
> On Thu, Jan 9, 2014 at 7:36 AM, jyoti allur 
> <[email protected]>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++;
> +}
>

Ooops, as was pointed out to me I pasted the unmodified code. Here's the
example I was actually using:

struct S { int i; };
void foo(void* p) { ((S*)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
>>
>
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to