Files
clang-p2996/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
Jeremy Morse df4199c3a4 [DebugInfo] Use correct unit when creating variable across CU boundary (#133282)
When creating a static member DIE, we place it in a potentially
pre-existing context DIE, and that DIE might be located in a different
CU if we're in an LTO context. When we then add the source-file-ID to
the static member DIE, use the correct Unit to do so -- the one that
owns the context DIE. Otherwise we might assign a file-ID from one CU to
another, and there isn't a guarantee that they'll be the same file, or
even exist.

Fixes #109227

(I'd normally remove my home directory from these tests, but in this
circumstances the same-file-but-with-a-different-name nature of the
DIFile is part of the test).
2025-06-05 10:32:17 +01:00

76 KiB