Vladislav Dzhidzhoev c513ed117f
[DebugInfo] Add Verifier check for duplicate arg indices in SP's retainedNodes list (#186225)
DwarfFile asserts if two arguments of the same subprogram with the same
index are present in a DISubprogram scope:
5d7a502a9d/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp (L110)

This patch adds a check to the Verifier to detect such invalid IR
earlier. It can be helpful for finding reproducers for bugs like
https://issues.chromium.org/issues/40288032.

The incorrect args field of DILocalVariable in
llvm/test/DebugInfo/MIR/X86/live-debug-values-reg-copy.mir is fixed.
2026-03-13 14:51:41 +01:00
..