DWARFEmitter.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===--- DWARFEmitter.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. /// \file
  14. /// Common declarations for yaml2obj
  15. //===----------------------------------------------------------------------===//
  16. #ifndef LLVM_OBJECTYAML_DWARFEMITTER_H
  17. #define LLVM_OBJECTYAML_DWARFEMITTER_H
  18. #include "llvm/ADT/StringMap.h"
  19. #include "llvm/ADT/StringRef.h"
  20. #include "llvm/Support/Error.h"
  21. #include "llvm/Support/Host.h"
  22. #include "llvm/Support/MemoryBuffer.h"
  23. #include <memory>
  24. namespace llvm {
  25. class raw_ostream;
  26. namespace DWARFYAML {
  27. struct Data;
  28. Error emitDebugAbbrev(raw_ostream &OS, const Data &DI);
  29. Error emitDebugStr(raw_ostream &OS, const Data &DI);
  30. Error emitDebugAranges(raw_ostream &OS, const Data &DI);
  31. Error emitDebugRanges(raw_ostream &OS, const Data &DI);
  32. Error emitDebugPubnames(raw_ostream &OS, const Data &DI);
  33. Error emitDebugPubtypes(raw_ostream &OS, const Data &DI);
  34. Error emitDebugGNUPubnames(raw_ostream &OS, const Data &DI);
  35. Error emitDebugGNUPubtypes(raw_ostream &OS, const Data &DI);
  36. Error emitDebugInfo(raw_ostream &OS, const Data &DI);
  37. Error emitDebugLine(raw_ostream &OS, const Data &DI);
  38. Error emitDebugAddr(raw_ostream &OS, const Data &DI);
  39. Error emitDebugStrOffsets(raw_ostream &OS, const Data &DI);
  40. Error emitDebugRnglists(raw_ostream &OS, const Data &DI);
  41. Error emitDebugLoclists(raw_ostream &OS, const Data &DI);
  42. std::function<Error(raw_ostream &, const Data &)>
  43. getDWARFEmitterByName(StringRef SecName);
  44. Expected<StringMap<std::unique_ptr<MemoryBuffer>>>
  45. emitDebugSections(StringRef YAMLString,
  46. bool IsLittleEndian = sys::IsLittleEndianHost,
  47. bool Is64BitAddrSize = true);
  48. } // end namespace DWARFYAML
  49. } // end namespace llvm
  50. #endif // LLVM_OBJECTYAML_DWARFEMITTER_H
  51. #ifdef __GNUC__
  52. #pragma GCC diagnostic pop
  53. #endif