Index: lldb/trunk/include/lldb/Core/dwarf.h =================================================================== --- lldb/trunk/include/lldb/Core/dwarf.h +++ lldb/trunk/include/lldb/Core/dwarf.h @@ -22,7 +22,7 @@ typedef int32_t dw_sleb128_t; typedef uint16_t dw_attr_t; typedef uint16_t dw_form_t; -typedef uint16_t dw_tag_t; +typedef llvm::dwarf::Tag dw_tag_t; typedef uint64_t dw_addr_t; // Dwarf address define that must be big enough for // any addresses in the compile units that get // parsed Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp @@ -18,7 +18,8 @@ using namespace lldb_private; DWARFAbbreviationDeclaration::DWARFAbbreviationDeclaration() - : m_code(InvalidCode), m_tag(0), m_has_children(0), m_attributes() {} + : m_code(InvalidCode), m_tag(llvm::dwarf::DW_TAG_null), m_has_children(0), + m_attributes() {} DWARFAbbreviationDeclaration::DWARFAbbreviationDeclaration(dw_tag_t tag, uint8_t has_children) @@ -33,7 +34,7 @@ return DWARFEnumState::Complete; m_attributes.clear(); - m_tag = data.GetULEB128(offset_ptr); + m_tag = static_cast(data.GetULEB128(offset_ptr)); if (m_tag == DW_TAG_null) return llvm::make_error( "abbrev decl requires non-null tag."); @@ -68,7 +69,7 @@ } bool DWARFAbbreviationDeclaration::IsValid() { - return m_code != 0 && m_tag != 0; + return m_code != 0 && m_tag != llvm::dwarf::DW_TAG_null; } uint32_t Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.cpp =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.cpp +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.cpp @@ -30,7 +30,7 @@ if (m_die) return m_die->Tag(); else - return 0; + return llvm::dwarf::DW_TAG_null; } const char *DWARFBaseDIE::GetTagAsCString() const { Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h @@ -31,7 +31,7 @@ DWARFDebugInfoEntry() : m_offset(DW_INVALID_OFFSET), m_parent_idx(0), m_sibling_idx(0), - m_has_children(false), m_abbr_idx(0), m_tag(0) {} + m_has_children(false), m_abbr_idx(0), m_tag(llvm::dwarf::DW_TAG_null) {} explicit operator bool() const { return m_offset != DW_INVALID_OFFSET; } bool operator==(const DWARFDebugInfoEntry &rhs) const; @@ -178,8 +178,9 @@ // a single NULL terminating child. m_has_children : 1; uint16_t m_abbr_idx; - uint16_t m_tag; // A copy of the DW_TAG value so we don't have to go through - // the compile unit abbrev table + /// A copy of the DW_TAG value so we don't have to go through the compile + /// unit abbrev table + dw_tag_t m_tag = llvm::dwarf::DW_TAG_null; }; #endif // SymbolFileDWARF_DWARFDebugInfoEntry_h_ Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp @@ -192,7 +192,7 @@ *offset_ptr = offset; return true; } else { - m_tag = 0; + m_tag = llvm::dwarf::DW_TAG_null; m_has_children = false; return true; // NULL debug tag entry } Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h @@ -23,7 +23,7 @@ class DWARFDeclContext { public: struct Entry { - Entry() : tag(0), name(nullptr) {} + Entry() : tag(llvm::dwarf::DW_TAG_null), name(nullptr) {} Entry(dw_tag_t t, const char *n) : tag(t), name(n) {} bool NameMatches(const Entry &rhs) const { Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h =================================================================== --- lldb/trunk/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h +++ lldb/trunk/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h @@ -53,7 +53,7 @@ struct DIEInfo { dw_offset_t die_offset = DW_INVALID_OFFSET; - dw_tag_t tag = 0; + dw_tag_t tag = llvm::dwarf::DW_TAG_null; /// Any flags for this DIEInfo. uint32_t type_flags = 0;