DWARFCompileUnit.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- DWARFCompileUnit.h ---------------------------------------*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_DEBUGINFO_DWARF_DWARFCOMPILEUNIT_H
  14. #define LLVM_DEBUGINFO_DWARF_DWARFCOMPILEUNIT_H
  15. #include "llvm/DebugInfo/DWARF/DWARFUnit.h"
  16. namespace llvm {
  17. class DWARFContext;
  18. class DWARFDebugAbbrev;
  19. class raw_ostream;
  20. struct DIDumpOptions;
  21. struct DWARFSection;
  22. class DWARFCompileUnit : public DWARFUnit {
  23. public:
  24. DWARFCompileUnit(DWARFContext &Context, const DWARFSection &Section,
  25. const DWARFUnitHeader &Header, const DWARFDebugAbbrev *DA,
  26. const DWARFSection *RS, const DWARFSection *LocSection,
  27. StringRef SS, const DWARFSection &SOS,
  28. const DWARFSection *AOS, const DWARFSection &LS, bool LE,
  29. bool IsDWO, const DWARFUnitVector &UnitVector)
  30. : DWARFUnit(Context, Section, Header, DA, RS, LocSection, SS, SOS, AOS,
  31. LS, LE, IsDWO, UnitVector) {}
  32. /// VTable anchor.
  33. ~DWARFCompileUnit() override;
  34. /// Dump this compile unit to \p OS.
  35. void dump(raw_ostream &OS, DIDumpOptions DumpOpts) override;
  36. /// Enable LLVM-style RTTI.
  37. static bool classof(const DWARFUnit *U) { return !U->isTypeUnit(); }
  38. };
  39. } // end namespace llvm
  40. #endif // LLVM_DEBUGINFO_DWARF_DWARFCOMPILEUNIT_H
  41. #ifdef __GNUC__
  42. #pragma GCC diagnostic pop
  43. #endif