)]}'
{
  "commit": "8ac8e6fc1645f73fbb0a82364980576c5fa2bb67",
  "tree": "7a7b5bcea16c96c8adf229f3f97b81faaf2f7970",
  "parents": [
    "bd62f9327279e7e2bcbc9c30476e1b868e4f0081"
  ],
  "author": {
    "name": "Peter Rong",
    "email": "peterrong96@gmail.com",
    "time": "Wed May 06 11:56:16 2026 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed May 06 11:56:16 2026 -0700"
  },
  "message": "[dsymutil] Fix linker\u0027s ODR uniquing for typedefs with different underlying types (#195749)\n\nThe classic DWARF linker\u0027s `DeclContext` uniquing for `typedef` only\nconsiders the typedef\u0027s name, file, and line — not the type it refers\nto. When two `typedef` share the same name and source location but point\nto different underlying types (e.g. due to clang\u0027s `preferred_name`\nattribute generating a second typedef), they get the same `DeclContext`.\nODR deduplication then merges them, which can produce incorrect type\nreferences or self-referencing typedef cycles in the output DWARF.\n\nThe self-referencing cycles are latent until a consumer follows\n`DW_AT_type` chains through typedefs.\nIn particular, `unwrapReferencedTypedefType()` (introduced in\n[#168734](https://github.com/llvm/llvm-project/pull/168734)) caused an\ninfinite recursion and eventual stack overflow.\n\nFix this by including the `DW_AT_type` target\u0027s tag and name in the\n`NameForUniquing`, such that `typedef` with different underlying types\nget distinct `DeclContexts`. This mirrors the parallel linker fix in\nhttps://github.com/llvm/llvm-project/pull/166767\n\nAdded a test for validation\n\n[Assisted-by](https://t.ly/Dkjjk): [Claude Opus\n4.6](https://www.anthropic.com/news/claude-opus-4-6)\n\n---------\n\nSigned-off-by: Peter Rong \u003cPeterRong@meta.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8aa3a4cbc63c4d41fd9c5332fa3b851b0682b594",
      "old_mode": 33188,
      "old_path": "llvm/lib/DWARFLinker/Classic/DWARFLinkerDeclContext.cpp",
      "new_id": "bfec342526ea43460b2a14d5e744f2b34cf724ac",
      "new_mode": 33188,
      "new_path": "llvm/lib/DWARFLinker/Classic/DWARFLinkerDeclContext.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e57c0b9276e2f42f814599a630316e6ab1ebdb0d",
      "new_mode": 33188,
      "new_path": "llvm/test/tools/dsymutil/AArch64/typedef-different-types.test"
    }
  ]
}
