1//===--- DWARFEmitter.h - ---------------------------------------*- C++ -*-===//
2//
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
6//
7//===----------------------------------------------------------------------===//
8/// \file
9/// Common declarations for yaml2obj
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/MemoryBuffer.h"
19#include "llvm/TargetParser/Host.h"
20#include <memory>
21
22namespace llvm {
23
24class raw_ostream;
25
26namespace DWARFYAML {
27
28struct Data;
29
30Error emitDebugAbbrev(raw_ostream &OS, const Data &DI);
31Error emitDebugStr(raw_ostream &OS, const Data &DI);
32
33Error emitDebugAranges(raw_ostream &OS, const Data &DI);
34Error emitDebugRanges(raw_ostream &OS, const Data &DI);
35Error emitDebugPubnames(raw_ostream &OS, const Data &DI);
36Error emitDebugPubtypes(raw_ostream &OS, const Data &DI);
37Error emitDebugGNUPubnames(raw_ostream &OS, const Data &DI);
38Error emitDebugGNUPubtypes(raw_ostream &OS, const Data &DI);
39Error emitDebugInfo(raw_ostream &OS, const Data &DI);
40Error emitDebugLine(raw_ostream &OS, const Data &DI);
41Error emitDebugAddr(raw_ostream &OS, const Data &DI);
42Error emitDebugStrOffsets(raw_ostream &OS, const Data &DI);
43Error emitDebugRnglists(raw_ostream &OS, const Data &DI);
44Error emitDebugLoclists(raw_ostream &OS, const Data &DI);
45Error emitDebugNames(raw_ostream &OS, const Data &DI);
46
47std::function<Error(raw_ostream &, const Data &)>
48getDWARFEmitterByName(StringRef SecName);
49Expected<StringMap<std::unique_ptr<MemoryBuffer>>>
50emitDebugSections(StringRef YAMLString,
51 bool IsLittleEndian = sys::IsLittleEndianHost,
52 bool Is64BitAddrSize = true);
53} // end namespace DWARFYAML
54} // end namespace llvm
55
56#endif // LLVM_OBJECTYAML_DWARFEMITTER_H
57

source code of llvm/include/llvm/ObjectYAML/DWARFEmitter.h