[all-commits] [llvm/llvm-project] 354944: [DebugInfo] Fully implement DWARF issue 180201.1 (...

Scott Linder via All-commits all-commits at lists.llvm.org
Mon Jul 21 15:42:43 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 354944d675c04c87bc0e9ebcca900148f5a344b8
      https://github.com/llvm/llvm-project/commit/354944d675c04c87bc0e9ebcca900148f5a344b8
  Author: Scott Linder <scott.linder at amd.com>
  Date:   2025-07-21 (Mon, 21 Jul 2025)

  Changed paths:
    M llvm/lib/AsmParser/LLParser.cpp
    M llvm/lib/IR/AsmWriter.cpp
    M llvm/lib/MC/MCDwarf.cpp
    A llvm/test/Assembler/difile-empty-source.ll
    M llvm/test/DebugInfo/Generic/mixed-source.ll

  Log Message:
  -----------
  [DebugInfo] Fully implement DWARF issue 180201.1 (#149226)

Finish making LLVM's implementation of `DW_LNCT_LLVM_source` conform to
the final accepted version of `DW_LNCT_source` from
https://dwarfstd.org/issues/180201.1.html

This is effectively a continuation of a few commits which have moved in
this direction already, including:

* c9cb4fc761cd7 [DebugInfo] Store optional DIFile::Source as pointer
* 87e22bdd2bd6d Allow for mixing source/no-source DIFiles in one CU

This patch:

* Teaches LLParser that there is a distinction between an empty and an
absent "source:" field on DIFile.
* Makes printing the "source:" field in AsmWriter conditional on it
being present, instead of being conditional on it being non-empty.
* Teaches MC to map an empty-but-present source field to "\n" (which is
ambiguous, making the source strings "" and "\n" indistinguishable, but
that's what the DWARF issue specifies).

Add a test for round-tripping an empty source field through
assembler/bitcode.

Extend the test for the actual DWARF generation so it covers all of the
cases (absent, present-but-empty,
present-and-ambiguously-single-newline, present).



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