Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions llvm/lib/Bitcode/Reader/MetadataLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions llvm/test/DebugInfo/AArch64/DW_AT_APPLE_enum_kind.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
; RUN: llc < %s -filetype=obj -o %t
; RUN: llvm-dwarfdump -v %t | FileCheck %s
; RUN: clang++ %s -c -g -emit-llvm -o %t.bc
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an LLVM test can't/shouldn't depend on clang. Can you check in the bitcode file instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good
Instead of checking in bitcode i roundtrip this file through llvm-dis/llvm-as instead. Which tests the same codepath

; RUN: llc %t.bc -filetype=obj -o %t.o
; RUN: llvm-dwarfdump -v %t.o | FileCheck %s

; C++ source to regenerate:
; enum __attribute__((enum_extensibility(open))) OpenEnum {
Expand Down