[llvm] [Dwarf][Transforms] Add dwarf support when func signature changed (PR #127855)

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 4 07:42:13 PDT 2025


yonghong-song wrote:

> @yonghong-song yes that is what I suggested.
> 
> As @dwblaikie said a while back, we should try to solve the general problem of modified ABI but the function name is the same. We should not be limited to describing what LLVM happens to do today.

@pogo59 Good point.
Okay, I think we can extend to possible multiple signature changes like below:
```
DW_TAG_subprogram
                DW_AT_low_pc	(0x0000000100003ed8)
                DW_AT_high_pc	(0x0000000100003f18)
                DW_AT_frame_base	(...)
                DW_AT_name	("foo")

                DW_TAG_formal_parameter
                   DW_AT_name	("a")
                   DW_AT_type	(0x0000000000000091 "int")

                DW_TAG_formal_parameter
                   DW_AT_location
                   DW_AT_name	("b")
                   DW_AT_type	(0x0000000000000095 "float")

                DW_TAG_formal_parameter
                   DW_AT_location
                   DW_AT_name	("c")
                   DW_AT_type	(0x0000000000000025 "char")

NULL

       DW_TAG_inlined_subroutine
                DW_AT_name	("foo")    
                DW_AT_type	(0x0000000000000091 "int")
                DW_AT_artificial (true)
                DW_AT_specificiation (original DW_TAG_subprogram)

                DW_TAG_formal_parameter
                  DW_AT_name	("b")
                  DW_AT_type	(0x0000000000000091 "int")

               DW_TAG_formal_parameter
                  DW_AT_name	("c")
                  DW_AT_type	(0x0000000000000095 "float")

       DW_TAG_inlined_subroutine
                DW_AT_name	("foo.1")    
                DW_AT_type	(0x0000000000000091 "int")
                DW_AT_artificial (true)
                DW_AT_specificiation (original DW_TAG_subprogram)

                DW_TAG_formal_parameter
                  DW_AT_name	("b")
                  DW_AT_type	(0x0000000000000091 "int")
```

WDYT?

https://github.com/llvm/llvm-project/pull/127855


More information about the llvm-commits mailing list