1 //===-- DWARFTypeUnit.h -----------------------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef LLVM_DEBUGINFO_DWARFTYPEUNIT_H 11 #define LLVM_DEBUGINFO_DWARFTYPEUNIT_H 12 13 #include "DWARFUnit.h" 14 15 namespace llvm { 16 17 class DWARFTypeUnit : public DWARFUnit { 18 private: 19 uint64_t TypeHash; 20 uint32_t TypeOffset; 21 public: DWARFTypeUnit(const DWARFDebugAbbrev * DA,StringRef IS,StringRef RS,StringRef SS,StringRef SOS,StringRef AOS,const RelocAddrMap * M,bool LE)22 DWARFTypeUnit(const DWARFDebugAbbrev *DA, StringRef IS, StringRef RS, 23 StringRef SS, StringRef SOS, StringRef AOS, 24 const RelocAddrMap *M, bool LE) 25 : DWARFUnit(DA, IS, RS, SS, SOS, AOS, M, LE) {} getHeaderSize()26 uint32_t getHeaderSize() const override { 27 return DWARFUnit::getHeaderSize() + 12; 28 } 29 void dump(raw_ostream &OS); 30 protected: 31 bool extractImpl(DataExtractor debug_info, uint32_t *offset_ptr) override; 32 }; 33 34 } 35 36 #endif 37 38