DWARFCompileUnit.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. #include "llvm/DebugInfo/DWARF/DWARFUnitIndex.h"
  17. namespace llvm {
  18. class DWARFCompileUnit : public DWARFUnit {
  19. public:
  20. DWARFCompileUnit(DWARFContext &Context, const DWARFSection &Section,
  21. const DWARFUnitHeader &Header, const DWARFDebugAbbrev *DA,
  22. const DWARFSection *RS, const DWARFSection *LocSection,
  23. StringRef SS, const DWARFSection &SOS,
  24. const DWARFSection *AOS, const DWARFSection &LS, bool LE,
  25. bool IsDWO, const DWARFUnitVector &UnitVector)
  26. : DWARFUnit(Context, Section, Header, DA, RS, LocSection, SS, SOS, AOS,
  27. LS, LE, IsDWO, UnitVector) {}
  28. /// VTable anchor.
  29. ~DWARFCompileUnit() override;
  30. /// Dump this compile unit to \p OS.
  31. void dump(raw_ostream &OS, DIDumpOptions DumpOpts) override;
  32. /// Enable LLVM-style RTTI.
  33. static bool classof(const DWARFUnit *U) { return !U->isTypeUnit(); }
  34. };
  35. } // end namespace llvm
  36. #endif // LLVM_DEBUGINFO_DWARF_DWARFCOMPILEUNIT_H
  37. #ifdef __GNUC__
  38. #pragma GCC diagnostic pop
  39. #endif