[all-commits] [llvm/llvm-project] cede23: [llvm][DebugInfo] Drop \01 mangling prefix when in...

Michael Buch via All-commits all-commits at lists.llvm.org
Mon May 12 05:34:23 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cede236fa550266c9ee32c458363bb505f512d12
      https://github.com/llvm/llvm-project/commit/cede236fa550266c9ee32c458363bb505f512d12
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2025-05-12 (Mon, 12 May 2025)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    A llvm/test/DebugInfo/Generic/debug-names-asm-label.ll

  Log Message:
  -----------
  [llvm][DebugInfo] Drop \01 mangling prefix when inserting linkage name into accelerator table (#138852)

On some platforms (particularly macOS), a `\01` prefix gets added to the
name in an `asm` label. This gets stripped when we emit the
[`DW_AT_linkage_name`](https://github.com/llvm/llvm-project/blob/2f877c2722e882fe6aaaab44d25b7a49ba0612e1/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp#L531).
But we weren't stripping this prefix when inserting the linkage name
into accelerator tables.

This manifested in an issue where LLDB tried to look up a name in the
index by linkage name, but wasn't able to find it because we indexed it
with the `\01` unstripped.

This patch strips the prefix before indexing.



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