Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 1 | //===--- DWARFEmitter.h - ---------------------------------------*- C++ -*-===// |
| 2 | // |
Andrew Walbran | 16937d0 | 2019-10-22 13:54:20 +0100 | [diff] [blame] | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | /// \file |
Andrew Scull | cdfcccc | 2018-10-05 20:58:37 +0100 | [diff] [blame] | 9 | /// Common declarations for yaml2obj |
Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 10 | //===----------------------------------------------------------------------===// |
| 11 | |
| 12 | #ifndef LLVM_OBJECTYAML_DWARFEMITTER_H |
| 13 | #define LLVM_OBJECTYAML_DWARFEMITTER_H |
| 14 | |
| 15 | #include "llvm/ADT/StringMap.h" |
| 16 | #include "llvm/ADT/StringRef.h" |
| 17 | #include "llvm/Support/Error.h" |
| 18 | #include "llvm/Support/Host.h" |
| 19 | #include "llvm/Support/MemoryBuffer.h" |
| 20 | #include <memory> |
| 21 | |
| 22 | namespace llvm { |
| 23 | |
| 24 | class raw_ostream; |
| 25 | |
| 26 | namespace DWARFYAML { |
| 27 | |
| 28 | struct Data; |
| 29 | struct PubSection; |
| 30 | |
Olivier Deprez | f4ef2d0 | 2021-04-20 13:36:24 +0200 | [diff] [blame] | 31 | Error emitDebugAbbrev(raw_ostream &OS, const Data &DI); |
| 32 | Error emitDebugStr(raw_ostream &OS, const Data &DI); |
Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 33 | |
Olivier Deprez | f4ef2d0 | 2021-04-20 13:36:24 +0200 | [diff] [blame] | 34 | Error emitDebugAranges(raw_ostream &OS, const Data &DI); |
| 35 | Error emitDebugRanges(raw_ostream &OS, const Data &DI); |
| 36 | Error emitDebugPubnames(raw_ostream &OS, const Data &DI); |
| 37 | Error emitDebugPubtypes(raw_ostream &OS, const Data &DI); |
| 38 | Error emitDebugGNUPubnames(raw_ostream &OS, const Data &DI); |
| 39 | Error emitDebugGNUPubtypes(raw_ostream &OS, const Data &DI); |
| 40 | Error emitDebugInfo(raw_ostream &OS, const Data &DI); |
| 41 | Error emitDebugLine(raw_ostream &OS, const Data &DI); |
| 42 | Error emitDebugAddr(raw_ostream &OS, const Data &DI); |
| 43 | Error emitDebugStrOffsets(raw_ostream &OS, const Data &DI); |
| 44 | Error emitDebugRnglists(raw_ostream &OS, const Data &DI); |
| 45 | Error emitDebugLoclists(raw_ostream &OS, const Data &DI); |
Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 46 | |
Olivier Deprez | f4ef2d0 | 2021-04-20 13:36:24 +0200 | [diff] [blame] | 47 | std::function<Error(raw_ostream &, const Data &)> |
| 48 | getDWARFEmitterByName(StringRef SecName); |
Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 49 | Expected<StringMap<std::unique_ptr<MemoryBuffer>>> |
Olivier Deprez | f4ef2d0 | 2021-04-20 13:36:24 +0200 | [diff] [blame] | 50 | emitDebugSections(StringRef YAMLString, |
| 51 | bool IsLittleEndian = sys::IsLittleEndianHost, |
| 52 | bool Is64BitAddrSize = true); |
Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 53 | } // end namespace DWARFYAML |
Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 54 | } // end namespace llvm |
| 55 | |
| 56 | #endif // LLVM_OBJECTYAML_DWARFEMITTER_H |