[all-commits] [llvm/llvm-project] ade128: [DWARFLinker] Keep DW_TAG_enumerator children of a...

Augusto Noronha via All-commits all-commits at lists.llvm.org
Wed Jul 29 15:37:32 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ade128740327db281859708ddcb3b072903b3414
      https://github.com/llvm/llvm-project/commit/ade128740327db281859708ddcb3b072903b3414
  Author: Augusto Noronha <anoronha at apple.com>
  Date:   2026-07-29 (Wed, 29 Jul 2026)

  Changed paths:
    M llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp
    A llvm/test/tools/dsymutil/X86/keep-enumerators.test

  Log Message:
  -----------
  [DWARFLinker] Keep DW_TAG_enumerator children of a live enumeration_type (#212849)

Swift allows functions inside enums:

  enum Foo: Int {
    case bar = 0

    func baz() { ... }
    }

  DW_TAG_enumeration_type  "Foo"
    DW_TAG_enumerator        "bar"
    DW_TAG_subprogram        "baz"  DW_AT_declaration
  ...
  DW_TAG_subprogram  DW_AT_low_pc(...)  DW_AT_specification -> "baz"

dieNeedsChildrenToBeMeaningful() did not list DW_TAG_enumeration_type,
so the parent walk skipped the enum's children.

Assisted-by: claude

rdar://183549452



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