diff --git a/lldb/include/lldb/Core/dwarf.h b/lldb/include/lldb/Core/dwarf.h --- a/lldb/include/lldb/Core/dwarf.h +++ b/lldb/include/lldb/Core/dwarf.h @@ -21,7 +21,7 @@ } } -typedef uint16_t dw_attr_t; +typedef llvm::dwarf::Attribute dw_attr_t; typedef llvm::dwarf::Form dw_form_t; typedef llvm::dwarf::Tag dw_tag_t; typedef uint64_t dw_addr_t; // Dwarf address define that must be big enough for diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -274,6 +274,8 @@ if (!attributes.ExtractFormValueAtIndex(i, form_value)) continue; switch (attr) { + default: + break; case DW_AT_abstract_origin: abstract_origin = form_value; break; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp @@ -40,7 +40,7 @@ m_has_children = data.GetU8(offset_ptr); while (data.ValidOffset(*offset_ptr)) { - dw_attr_t attr = data.GetULEB128(offset_ptr); + auto attr = static_cast(data.GetULEB128(offset_ptr)); auto form = static_cast(data.GetULEB128(offset_ptr)); // This is the last attribute for this abbrev decl, but there may still be diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp @@ -391,6 +391,8 @@ if (!attributes.ExtractFormValueAtIndex(i, form_value)) continue; switch (attr) { + default: + break; case DW_AT_loclists_base: SetLoclistsBase(form_value.Unsigned()); break; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp --- a/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp @@ -239,6 +239,8 @@ dw_attr_t attr = attributes.AttributeAtIndex(i); DWARFFormValue form_value; switch (attr) { + default: + break; case DW_AT_name: if (attributes.ExtractFormValueAtIndex(i, form_value)) name = form_value.AsCString();