[llvm] Add support for NSDI DebugLine and DebugNoLine. (PR #215851)
Juan Manuel Martinez CaamaƱo via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 14 03:31:34 PDT 2026
================
@@ -167,6 +171,16 @@ class SPIRVNonSemanticDebugHandler : public DebugHandlerBase {
bool DebugFunctionDefinitionEmitted = false;
+ struct DebugLineState {
+ MCRegister SrcReg;
+ unsigned Line;
+ unsigned Col;
+ };
+ const MachineBasicBlock *CurLineMBB = nullptr;
+ std::optional<DebugLineState> CurLineState;
+
+ bool EmitDebugLineForCurrentFn = false;
----------------
jmmartinez wrote:
To go further, `EmitDebugLineForCurrentFn` is set to true when the current function has a Subprogram that is a definition. I think this may be redundant with `DebugFunctionDefinitionEmitted`.
We could set the optional when we assign `DebugFunctionDefinitionEmitted` the first time.
https://github.com/llvm/llvm-project/pull/215851
More information about the llvm-commits
mailing list