[debug-info] As an NFC commit, refactor EmitFuncArgumentDbgValue so that it...
[debug-info] As an NFC commit, refactor EmitFuncArgumentDbgValue so that it can be extended to support llvm.dbg.addr. The reason why I am making this change is that before this commit, EmitFuncArgumentDbgValue relied on a boolean flag IsDbgDeclare both to signal that a DBG_VALUE should be made to be indirect /and/ that the original intrinsic was a dbg.declare. This is no longer always true if we add support for handling dbg.addr since we will have an indirect DBG_VALUE that is a different intrinsic from dbg.declare. With that in mind, in this NFC patch, we prepare for future fixes by introducing a 3 case-enum argument to EmitFuncArgumentDbgValue that allows the caller to explicitly specify how the argument's DBG_VALUE should be emitted. This then allows us to turn the indirect checks into a != FuncArgumentDbgValueKind::Value and prepare us for a future where we add support here for llvm.dbg.addr directly. rdar://83957028 Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D122945
Loading
Please sign in to comment