From: David Blaikie Date: Wed, 9 Oct 2019 18:37:13 +0000 (+0000) Subject: DebugInfo: Shot in the dark attempt to fix ubsan error from r374122 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6ee28aaf7fa923ca9fe8e0d7f58a5feeb7f356be;p=llvm DebugInfo: Shot in the dark attempt to fix ubsan error from r374122 (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 --- diff --git a/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp b/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp index a5f79f86852..a243ed3a80b 100644 --- a/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp +++ b/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp @@ -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(Data.getU8(C))) { + while (auto Kind = Data.getU8(C)) { Entry E; E.Kind = Kind; switch (Kind) {