[llvm] Add new llvm.dbg.declare_value intrinsic. (PR #168132)
Shubham Sandeep Rastogi via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 18 13:53:40 PST 2025
rastogishubham wrote:
>I see this is adding some more intrinsic definitions -- could we avoid this
@jmorse I only added the code for intrinsics for completeness, tbh, I looked at everywhere dbg_declare was defined and add code for declare_value, as far as I can see, swift only needs to call `DIBuilder.insertDeclareValue` so it doesn't care about the intrinsics either. However, I am not sure what code I can remove for removing intrinsic support however. Let me try
>DbgVariableRecord has helpers like isAddressOfVariable and isValueOfVariable which are used in a few places in the codebase -- should declare_value return true for any of those?
Conceptually dbg_declare_value is supposed to be a dbg_declare but one that can hold a value rather than a ptr to a value, so `isValueOfVariable` should return true I think
https://github.com/llvm/llvm-project/pull/168132
More information about the llvm-commits
mailing list