1 //===-- DWARFCompileUnit.h --------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef SymbolFileDWARF_DWARFCompileUnit_h_
11 #define SymbolFileDWARF_DWARFCompileUnit_h_
13 #include "DWARFUnit.h"
15 class DWARFCompileUnit : public DWARFUnit {
17 static DWARFUnitSP Extract(SymbolFileDWARF *dwarf2Data,
18 const lldb_private::DWARFDataExtractor &debug_info,
19 lldb::offset_t *offset_ptr);
20 void Dump(lldb_private::Stream *s) const override;
22 //------------------------------------------------------------------
23 /// Get the data that contains the DIE information for this unit.
26 /// The correct data (.debug_types for DWARF 4 and earlier, and
27 /// .debug_info for DWARF 5 and later) for the DIE information in
29 //------------------------------------------------------------------
30 const lldb_private::DWARFDataExtractor &GetData() const override;
32 //------------------------------------------------------------------
33 /// Get the size in bytes of the header.
36 /// Byte size of the compile unit header
37 //------------------------------------------------------------------
38 uint32_t GetHeaderByteSize() const override {
39 return m_is_dwarf64 ? 23 : 11;
43 DWARFCompileUnit(SymbolFileDWARF *dwarf2Data);
44 DISALLOW_COPY_AND_ASSIGN(DWARFCompileUnit);
47 #endif // SymbolFileDWARF_DWARFCompileUnit_h_