<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 26, 2014 at 10:33 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">
<div class="">On Thu, Jan 9, 2014 at 7:36 AM, jyoti allur <span dir="ltr"><<a href="mailto:jyoti.yalamanchili@gmail.com" target="_blank">jyoti.yalamanchili@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
  This bug appears only when typedef is used.<br></blockquote><div><br></div></div><div>Could you demonstrate this? My simple experiments seem to indicate that this is not a typedef bug:<br><br>Removing the macro and typedef from your test case I still don't see "struct S" emitted in Clang's DWARF:<div class="">
<br>
<br><span style="font-family:monospace">+typedef struct S { int i; } *T;</span><br style="font-family:monospace"><span style="font-family:monospace">+#define M(p) ((T) (p))</span><br style="font-family:monospace"><span style="font-family:monospace">+</span><br style="font-family:monospace">

<span style="font-family:monospace">+void</span><br style="font-family:monospace"><span style="font-family:monospace">+foo (void* p)</span><br style="font-family:monospace"><span style="font-family:monospace">+{</span><br style="font-family:monospace">

<span style="font-family:monospace">+  M (p)->i++;</span><br style="font-family:monospace"><span style="font-family:monospace">+}<br></span></div></div></div></div></div></blockquote><div><br></div><div>Ooops, as was pointed out to me I pasted the unmodified code. Here's the example I was actually using:<br>
<br><div>struct S { int i; };</div><div>void foo(void* p) { ((S*)p)->i++; }</div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="">$ clang++-tot typedef.cpp -g -c && llvm-dwarfdump typedef.o | grep DW_TAG<br><span style="font-family:monospace"></span></div>
<div>0x0000000b: DW_TAG_compile_unit [1] *</div><div>0x00000026:   DW_TAG_subprogram [2] *</div><div>0x00000044:     DW_TAG_formal_parameter [3]  </div><div>0x00000053:   DW_TAG_pointer_type [4]</div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<br>
<a href="http://llvm-reviews.chandlerc.com/D2498" target="_blank">http://llvm-reviews.chandlerc.com/D2498</a><br>
</blockquote></div><br></div></div>
</blockquote></div><br></div></div>