[llvm] [SPIRV] Emit NonSemantic DebugGlobalVariable (PR #207230)

Diego Novillo via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 07:31:54 PDT 2026


================
@@ -561,6 +586,90 @@ std::optional<MCRegister> SPIRVNonSemanticDebugHandler::mapDISignatureTypeToReg(
   return lookupOptReg(DebugTypeRegs, Ty);
 }
 
+std::optional<MCRegister>
+SPIRVNonSemanticDebugHandler::resolveGlobalVariableParent(
+    const DIGlobalVariable *GV) const {
+  // TODO: When this backend emits debug instructions for namespace, subprogram,
+  // and module scopes, return GV->getScope()'s debug id.
----------------
dnovillo wrote:

Sure. Also note that the DICompileUnit case also needs to be handled here.

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


More information about the llvm-commits mailing list