Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 1 | //===--- DWARFEmitter.h - ---------------------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | /// \file |
Andrew Scull | cdfcccc | 2018-10-05 20:58:37 +0100 | [diff] [blame] | 10 | /// Common declarations for yaml2obj |
Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 11 | //===----------------------------------------------------------------------===// |
| 12 | |
| 13 | #ifndef LLVM_OBJECTYAML_DWARFEMITTER_H |
| 14 | #define LLVM_OBJECTYAML_DWARFEMITTER_H |
| 15 | |
| 16 | #include "llvm/ADT/StringMap.h" |
| 17 | #include "llvm/ADT/StringRef.h" |
| 18 | #include "llvm/Support/Error.h" |
| 19 | #include "llvm/Support/Host.h" |
| 20 | #include "llvm/Support/MemoryBuffer.h" |
| 21 | #include <memory> |
| 22 | |
| 23 | namespace llvm { |
| 24 | |
| 25 | class raw_ostream; |
| 26 | |
| 27 | namespace DWARFYAML { |
| 28 | |
| 29 | struct Data; |
| 30 | struct PubSection; |
| 31 | |
| 32 | void EmitDebugAbbrev(raw_ostream &OS, const Data &DI); |
| 33 | void EmitDebugStr(raw_ostream &OS, const Data &DI); |
| 34 | |
| 35 | void EmitDebugAranges(raw_ostream &OS, const Data &DI); |
| 36 | void EmitPubSection(raw_ostream &OS, const PubSection &Sect, |
| 37 | bool IsLittleEndian); |
| 38 | void EmitDebugInfo(raw_ostream &OS, const Data &DI); |
| 39 | void EmitDebugLine(raw_ostream &OS, const Data &DI); |
| 40 | |
| 41 | Expected<StringMap<std::unique_ptr<MemoryBuffer>>> |
Andrew Scull | cdfcccc | 2018-10-05 20:58:37 +0100 | [diff] [blame] | 42 | EmitDebugSections(StringRef YAMLString, bool ApplyFixups = false, |
Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 43 | bool IsLittleEndian = sys::IsLittleEndianHost); |
Andrew Scull | cdfcccc | 2018-10-05 20:58:37 +0100 | [diff] [blame] | 44 | StringMap<std::unique_ptr<MemoryBuffer>> |
| 45 | EmitDebugSections(llvm::DWARFYAML::Data &DI, bool ApplyFixups); |
Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 46 | |
| 47 | } // end namespace DWARFYAML |
Andrew Scull | 5e1ddfa | 2018-08-14 10:06:54 +0100 | [diff] [blame] | 48 | } // end namespace llvm |
| 49 | |
| 50 | #endif // LLVM_OBJECTYAML_DWARFEMITTER_H |