[PATCH] D147620: [DebugInfo] Keep the CU consistent for operating `DISubprogram`.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 16:36:03 PDT 2023


dblaikie added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1275-1278
+  DwarfCompileUnit *ContextCU = CUMap.lookup(SP->getUnit());
+  DIE *ContextDIE = ContextCU->getOrCreateContextDIE(SP->getScope());
+  ContextCU = static_cast<DwarfCompileUnit *>(ContextDIE->getUnit());
+  return *ContextCU;
----------------
Could you explain more about when/how/why these are ever different CUs? (when would the scope have a different CU from the subprogram itself)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147620/new/

https://reviews.llvm.org/D147620



More information about the llvm-commits mailing list