)]}'
{
  "commit": "1d2645fef0f2eabe3f96f70dde8a82b3c41ca6c7",
  "tree": "4b0fbc3d18a4fe5de79268ae03d4814ec3c270e7",
  "parents": [
    "cf360fbc1f6725b085c18c7cde88e823aecedf01"
  ],
  "author": {
    "name": "adams381",
    "email": "adams@nvidia.com",
    "time": "Wed Jul 01 12:38:15 2026 -0500"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Jul 01 12:38:15 2026 -0500"
  },
  "message": "[CIR] Fix getNewInitValue on string-literal arrays\n\n`getNewInitValue` in `CIRGenModule.cpp` rebuilds a global\u0027s initializer when\n`replaceGlobal` fixes up references after a global\u0027s type changes -- for\nexample when an `extern` array is referenced while still incomplete and then\ncompleted. Its `ConstArrayAttr` branch cast `getElts()` to an `mlir::ArrayAttr`,\nbut a `ConstArrayAttr` built from a string literal stores its elements as a\n`StringAttr`. A struct global that both points at the replaced global and has a\n`char` array member therefore aborted on a failed `cast\u003cArrayAttr\u003e` during\nCIRGen.\n\n`ConstArrayAttr::verify` allows only two element kinds: an `ArrayAttr` or a\n`StringAttr`. A `StringAttr` holds raw 8-bit bytes and references no globals, so\nthere is nothing to rewrite. The fix returns the initializer unchanged for the\n`StringAttr` case and `cast`s on the `ArrayAttr` path, so a future third element\nkind asserts rather than silently passing through.\n\nThis surfaced compiling CPython\u0027s deep-frozen module data (SPEC CPU 2026\n714.cpython_r), where frozen objects cross-reference each other and carry string\npayloads. The benchmark advances past this abort to a const-record type-identity\nissue that is tracked separately.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "304f71f693c6b85986d0ca941453a431e6f6f025",
      "old_mode": 33188,
      "old_path": "clang/lib/CIR/CodeGen/CIRGenModule.cpp",
      "new_id": "7a05aed4c33e0cf0c157978fd785d9d6b701ba11",
      "new_mode": 33188,
      "new_path": "clang/lib/CIR/CodeGen/CIRGenModule.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2f89b31888eacafc4dae9f9809c7dcd7168d8160",
      "new_mode": 33188,
      "new_path": "clang/test/CIR/CodeGen/global-replace-string-array.c"
    }
  ]
}
