[Mlir-commits] [llvm] [mlir] [llvm][DebugInfo] Add new DW_AT_APPLE_enum_kind to encode enum_extensibility (PR #124752)

Tom Tromey llvmlistbot at llvm.org
Mon Mar 17 08:59:09 PDT 2025


tromey wrote:

This already landed, but I noticed an oddity in the `MetadataLoader.cpp` code.  The patch does:
```
  case bitc::METADATA_COMPOSITE_TYPE: {
    if (Record.size() < 16 || Record.size() > 25)
      return error("Invalid record");
...
    if (Record.size() > 25 && Record[25] != dwarf::DW_APPLE_ENUM_KIND_invalid)
      EnumKind = Record[25];
```
I don't think that second `if` can ever be true, and that using `24` there would be correct.

https://github.com/llvm/llvm-project/pull/124752


More information about the Mlir-commits mailing list