[all-commits] [llvm/llvm-project] df4199: [DebugInfo] Use correct unit when creating variabl...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Thu Jun 5 02:32:38 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: df4199c3a4cd458684dbbc15cb8eb76255080d2f
      https://github.com/llvm/llvm-project/commit/df4199c3a4cd458684dbbc15cb8eb76255080d2f
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2025-06-05 (Thu, 05 Jun 2025)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
    A llvm/test/DebugInfo/X86/file-index-across-cu.ll

  Log Message:
  -----------
  [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).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list