[clang] [llvm] Disentangle DISubprogram ODR type method uniquing from metadata uniquing (PR #217042)

Orlando Cazalet-Hyams via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 3 08:57:20 PST 2026


================
@@ -529,6 +530,9 @@ bool LLParser::validateEndOfModule(bool UpgradeDebugInfo) {
                  "use of undefined value '@" +
                      Twine(ForwardRefValIDs.begin()->first) + "'");
 
+  if (Context.isODRUniquingDebugTypes())
+    Context.getDebugTypeODRUniquer()->finalizeUnresolvedSubprogramDecls();
+
   // Resolve metadata cycles.
----------------
OCHyams wrote:

Thanks for the reproducer. I've softened the assertion to check that the scope is now a DIScope (rather than a placeholder MDNode used by the parser + loader for fwd refs).

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


More information about the cfe-commits mailing list