[llvm] Add DW_CC_nocall to function debug metadata when either return values...
[llvm] Add DW_CC_nocall to function debug metadata when either return values or arguments are removed Adding the `DW_CC_nocall` calling convention to the function debug metadata is needed when either the return values or the arguments of a function are removed as this helps in informing debugger that it may not be safe to call this function or try to interpret the return value. This translates to setting `DW_AT_calling_convention` with `DW_CC_nocall` for appropriate DWARF DIEs. The DWARF5 spec (section 3.3.1.1 Calling Convention Information) says: If the `DW_AT_calling_convention` attribute is not present, or its value is the constant `DW_CC_normal`, then the subroutine may be safely called by obeying the `standard` calling conventions of the target architecture. If the value of the calling convention attribute is the constant `DW_CC_nocall`, the subroutine does not obey standard calling conventions, and it may not be safe for the debugger to call this subroutine. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D127134
Loading
Please sign in to comment