diff options
author | Michael Buch <michaelbuch12@gmail.com> | 2025-03-22 08:09:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-22 08:09:49 +0000 |
commit | a27da0a20cbfb9f0c600d53bf2520f068b222f59 (patch) | |
tree | 5ec063992015c67a115b65b3100f98182716c946 /llvm/lib/Bitcode/Reader/MetadataLoader.cpp | |
parent | 6c8e9a6192a812237415d7d03d5ae234bc244c97 (diff) | |
download | llvm-a27da0a20cbfb9f0c600d53bf2520f068b222f59.zip llvm-a27da0a20cbfb9f0c600d53bf2520f068b222f59.tar.gz llvm-a27da0a20cbfb9f0c600d53bf2520f068b222f59.tar.bz2 |
[llvm][MetadataLoader] Make sure we correctly load DW_APPLE_ENUM_KIND from bitcode (#132374)
This was pointed out in
https://github.com/llvm/llvm-project/pull/124752#issuecomment-2730052773
There was no test that roundtrips this attribute through LLVM bitcode,
so this was never caught.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/MetadataLoader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/MetadataLoader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp index 1baf0a9..12794d3 100644 --- a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp +++ b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp @@ -1704,8 +1704,8 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata( } } - if (Record.size() > 25 && Record[25] != dwarf::DW_APPLE_ENUM_KIND_invalid) - EnumKind = Record[25]; + if (Record.size() > 24 && Record[24] != dwarf::DW_APPLE_ENUM_KIND_invalid) + EnumKind = Record[24]; DICompositeType *CT = nullptr; if (Identifier) |