anonymous
2012-Feb-24 14:17 UTC
[LLVMdev] DW_AT_inline not present in assembly for an inlined inline function
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 ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20120224/ced96b14/attachment.html>
Eric Christopher
2012-Feb-24 18:33 UTC
[LLVMdev] DW_AT_inline not present in assembly for an inlined inline function
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>
Apparently Analagous Threads
- [LLVMdev] Runtime linker issue wtih X11R6 on i386 with -O3 optimization
- Clang/LLVM producing incomplete & erroneous debug information
- [LLVMdev] [lldb-dev] How is variable info retrieved in debugging for executables generated by llvm backend?
- aarch64 do not generate debug info for tls var
- [LLVMdev] Minimizing -gmlt