Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:43:42

0001 //===- DWARFTypeUnit.h ------------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLVM_DEBUGINFO_DWARF_DWARFTYPEUNIT_H
0010 #define LLVM_DEBUGINFO_DWARF_DWARFTYPEUNIT_H
0011 
0012 #include "llvm/ADT/StringRef.h"
0013 #include "llvm/DebugInfo/DWARF/DWARFUnit.h"
0014 #include <cstdint>
0015 
0016 namespace llvm {
0017 
0018 struct DIDumpOptions;
0019 class DWARFContext;
0020 class DWARFDebugAbbrev;
0021 struct DWARFSection;
0022 class raw_ostream;
0023 
0024 class DWARFTypeUnit : public DWARFUnit {
0025 public:
0026   DWARFTypeUnit(DWARFContext &Context, const DWARFSection &Section,
0027                 const DWARFUnitHeader &Header, const DWARFDebugAbbrev *DA,
0028                 const DWARFSection *RS, const DWARFSection *LocSection,
0029                 StringRef SS, const DWARFSection &SOS, const DWARFSection *AOS,
0030                 const DWARFSection &LS, bool LE, bool IsDWO,
0031                 const DWARFUnitVector &UnitVector)
0032       : DWARFUnit(Context, Section, Header, DA, RS, LocSection, SS, SOS, AOS,
0033                   LS, LE, IsDWO, UnitVector) {}
0034 
0035   uint64_t getTypeHash() const { return getHeader().getTypeHash(); }
0036   uint64_t getTypeOffset() const { return getHeader().getTypeOffset(); }
0037 
0038   void dump(raw_ostream &OS, DIDumpOptions DumpOpts = {}) override;
0039   // Enable LLVM-style RTTI.
0040   static bool classof(const DWARFUnit *U) { return U->isTypeUnit(); }
0041 };
0042 
0043 } // end namespace llvm
0044 
0045 #endif // LLVM_DEBUGINFO_DWARF_DWARFTYPEUNIT_H