[LLVMdev] DW_AT_inline not present in assembly for an inlined inline function

Eric Christopher echristo at apple.com
Fri Feb 24 10:33:50 PST 2012


On Feb 24, 2012, at 6:17 AM, anonymous wrote:

> Hello
> 
> I am trying to run following test case on Clang compiled output to compare the dwarf inline attributes in the resulting assembly output .
> 
> /* Inlined inline function must have abstract DIE  */
> /* { dg-do compile } */
> /* { dg-options "-O2 -gdwarf-2 -dA -fpreprocessed" } */
> /* { dg-final { scan-assembler "3.*DW_AT_inline" } } */
> #1 "test.h"
> inline int t()
> {
> }
> int q()
> {
>   t();
> }
> 
> 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?
> I am aware that Clang uses C99 mode by default.
> 
> In case of GCC, 
> .uleb128 0x2    @ (DIE (0x25) DW_TAG_subprogram)
>         .byte   0x1     @ DW_AT_external
>         .ascii "t\0"    @ DW_AT_name
>         .byte   0x1     @ DW_AT_decl_file (test.h)
>         .byte   0x1     @ DW_AT_decl_line
>         .4byte  0x30    @ DW_AT_type
>         .byte   0x3     @ DW_AT_inline
> 
> In case of Clang,
> .byte   4                       @ Abbrev [4] 0x87:0xa DW_TAG_subprogram
>         .byte   116                     @ DW_AT_name
>         .byte   0
>         .byte   2                       @ DW_AT_decl_file
>         .byte   2                       @ DW_AT_decl_line
>         .long   128                     @ DW_AT_type
>         .byte   1                       @ DW_AT_external
>         .byte   0                       @ End Of Children Mark
> 
> Is this a bug in LLVM ?

Weird and yes. If you could file a bug and cc echristo at gmail.com I'd appreciate it.

Thanks!

-eric

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120224/1e68a770/attachment.html>


More information about the llvm-dev mailing list