Skip to content

Commit

Permalink
DebugInfo: Shot in the dark attempt to fix ubsan error from r374122
Browse files Browse the repository at this point in the history
(specifying an underlying type for the enum might also be suitable - but
this seems better/as good, since there's a clear expectation this can
contain values other than the actual enumerators of this enum)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374196 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dwblaikie committed Oct 9, 2019
1 parent 6ae61c3 commit 6ee28aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ DWARFDebugLoclists::parseOneLocationList(const DataExtractor &Data,
DataExtractor::Cursor C(*Offset);

// dwarf::DW_LLE_end_of_list_entry is 0 and indicates the end of the list.
while (auto Kind = static_cast<dwarf::LoclistEntries>(Data.getU8(C))) {
while (auto Kind = Data.getU8(C)) {
Entry E;
E.Kind = Kind;
switch (Kind) {
Expand Down

0 comments on commit 6ee28aa

Please sign in to comment.