[all-commits] [llvm/llvm-project] 28646d: [MC] Add .loc_label instruction (#99710)

alx32 via All-commits all-commits at lists.llvm.org
Fri Sep 20 06:32:57 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 28646d0cc12a01b0de2e4eb982cb91590bc2f84a
      https://github.com/llvm/llvm-project/commit/28646d0cc12a01b0de2e4eb982cb91590bc2f84a
  Author: alx32 <103613512+alx32 at users.noreply.github.com>
  Date:   2024-09-20 (Fri, 20 Sep 2024)

  Changed paths:
    M llvm/include/llvm/MC/MCDwarf.h
    M llvm/include/llvm/MC/MCObjectStreamer.h
    M llvm/include/llvm/MC/MCStreamer.h
    M llvm/lib/MC/MCAsmStreamer.cpp
    M llvm/lib/MC/MCDwarf.cpp
    M llvm/lib/MC/MCObjectStreamer.cpp
    M llvm/lib/MC/MCParser/AsmParser.cpp
    M llvm/lib/MC/MCStreamer.cpp
    A llvm/test/MC/ELF/debug-loc-label.s

  Log Message:
  -----------
  [MC] Add .loc_label instruction (#99710)

As discussed in [the
RFC](https://discourse.llvm.org/t/rfc-extending-llvm-mc-loc-directive-with-labeling-support/79608)
we need a way to create labels in the assembler-generated line section
in order to support the future addition of the
[DW_AT_LLVM_stmt_sequence](https://discourse.llvm.org/t/rfc-new-dwarf-attribute-for-symbolication-of-merged-functions/79434)
attribute.

We have a similar precedent for such behavior with the
[.cfi_label](https://github.com/llvm/llvm-project/pull/97922)
instruction - so we add the `.loc_label THE_LABEL_NAME` instruction
which:
- Terminates the current line sequence in the line section
- Creates a new label with the specified label name in the `.debug_line`
section



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