<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Feb 24, 2012, at 6:17 AM, anonymous wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span style="">Hello</span><div style=""><br></div><div style="">I am trying to run following test case on Clang compiled output to compare the dwarf inline attributes in the resulting assembly output .</div><div style=""><br></div><div style="">
<div>/* Inlined inline function must have abstract DIE */</div><div>/* { dg-do compile } */</div><div>/* { dg-options "-O2 -gdwarf-2 -dA -fpreprocessed" } */</div><div>/* { dg-final { scan-assembler "3.*DW_AT_inline" } } */</div>
<div>#1 "test.h"</div><div>inline int t()</div><div>{</div><div>}</div><div>int q()</div><div>{</div><div> t();</div><div>}</div></div><div style=""><br></div><div style="">The testcase fails because, DW_AT_inline is not present in assembly output. Could anyone let me know why DW_AT_inline is not emitted with Clang compiled assembly output?</div>
<div style="">I am aware that Clang uses C99 mode by default.</div><div style=""><br></div><div style="">In case of GCC, </div><div style=""><div><font color="#222222" face="arial, sans-serif">.uleb128 0x2 @ (DIE (0x25) DW_TAG_subprogram)</font></div>
<div><font color="#222222" face="arial, sans-serif"> .byte 0x1 @ DW_AT_external</font></div><div><font color="#222222" face="arial, sans-serif"> .ascii "t\0" @ DW_AT_name</font></div><div>
<font color="#222222" face="arial, sans-serif"> .byte 0x1 @ DW_AT_decl_file (test.h)</font></div><div><font color="#222222" face="arial, sans-serif"> .byte 0x1 @ DW_AT_decl_line</font></div><div>
<font color="#222222" face="arial, sans-serif"> .4byte 0x30 @ DW_AT_type</font></div><div><font color="#222222" face="arial, sans-serif"> .byte 0x3 @ DW_AT_inline</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">In case of Clang,</div><div><div><font color="#222222" face="arial, sans-serif">.byte 4 @ Abbrev [4] 0x87:0xa DW_TAG_subprogram</font></div>
<div><font color="#222222" face="arial, sans-serif"> .byte 116 @ DW_AT_name</font></div><div><font color="#222222" face="arial, sans-serif"> .byte 0</font></div><div><font color="#222222" face="arial, sans-serif"> .byte 2 @ DW_AT_decl_file</font></div>
<div><font color="#222222" face="arial, sans-serif"> .byte 2 @ DW_AT_decl_line</font></div><div><font color="#222222" face="arial, sans-serif"> .long 128 @ DW_AT_type</font></div>
<div><font color="#222222" face="arial, sans-serif"> .byte 1 @ DW_AT_external</font></div><div><font color="#222222" face="arial, sans-serif"> .byte 0 @ End Of Children Mark</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br></div></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">Is this a bug in LLVM ?</div></div></blockquote><br></div><div>Weird and yes. If you could file a bug and cc <a href="mailto:echristo@gmail.com">echristo@gmail.com</a> I'd appreciate it.</div><div><br></div><div>Thanks!</div><div><br></div><div>-eric</div><br></body></html>