[Mlir-commits] [llvm] [mlir] [llvm][DebugInfo] Add new DW_AT_APPLE_enum_kind to encode enum_extensibility (PR #124752)
Michael Buch
llvmlistbot at llvm.org
Tue Mar 18 04:17:09 PDT 2025
Michael137 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.
Yup thanks for catching that. Indeed that should be `24`. Surprised none of the new tests actually caught that 🤔
https://github.com/llvm/llvm-project/pull/124752
More information about the Mlir-commits
mailing list