1 //===-- DWARFTypeUnit.h -----------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef SymbolFileDWARF_DWARFTypeUnit_h_
10 #define SymbolFileDWARF_DWARFTypeUnit_h_
12 #include "DWARFUnit.h"
13 #include "llvm/Support/Error.h"
15 class DWARFTypeUnit : public DWARFUnit {
17 void BuildAddressRangeTable(DWARFDebugAranges *debug_aranges) override {}
19 void Dump(lldb_private::Stream *s) const override;
21 uint64_t GetTypeHash() { return m_header.GetTypeHash(); }
23 dw_offset_t GetTypeOffset() { return GetOffset() + m_header.GetTypeOffset(); }
25 static bool classof(const DWARFUnit *unit) { return unit->IsTypeUnit(); }
28 DWARFTypeUnit(SymbolFileDWARF &dwarf, lldb::user_id_t uid,
29 const DWARFUnitHeader &header,
30 const DWARFAbbreviationDeclarationSet &abbrevs,
31 DIERef::Section section, bool is_dwo)
32 : DWARFUnit(dwarf, uid, header, abbrevs, section, is_dwo) {}
34 friend class DWARFUnit;
37 #endif // SymbolFileDWARF_DWARFTypeUnit_h_