================
@@ -878,7 +818,12 @@ std::optional<MCRegister> 
SPIRVNonSemanticDebugHandler::emitDebugGlobalVariable(
     SPIRV::ModuleAnalysisInfo &MAI) {
   assert(GV && "GV must not be null in emitDebugGlobalVariable");
 
-  MCRegister ParentReg = resolveGlobalVariableParent(GV);
+  assert(!CompileUnits.empty() &&
+         "emitDebugGlobalVariable requires non-empty CompileUnits");
+  auto ParentRegOpt = resolveScope(GV->getScope());
+  assert(ParentRegOpt && "DebugCompilationUnit must be emitted before "
----------------
jmmartinez wrote:

Fixed!

https://github.com/llvm/llvm-project/pull/219925
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to