blob: 0d7d8b4efbdf622e2cc4b0616df1b8faf73aa659 [file] [log] [blame]
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01001//===--- 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
10/// \brief Common declarations for yaml2obj
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
23namespace llvm {
24
25class raw_ostream;
26
27namespace DWARFYAML {
28
29struct Data;
30struct PubSection;
31
32void EmitDebugAbbrev(raw_ostream &OS, const Data &DI);
33void EmitDebugStr(raw_ostream &OS, const Data &DI);
34
35void EmitDebugAranges(raw_ostream &OS, const Data &DI);
36void EmitPubSection(raw_ostream &OS, const PubSection &Sect,
37 bool IsLittleEndian);
38void EmitDebugInfo(raw_ostream &OS, const Data &DI);
39void EmitDebugLine(raw_ostream &OS, const Data &DI);
40
41Expected<StringMap<std::unique_ptr<MemoryBuffer>>>
42EmitDebugSections(StringRef YAMLString,
43 bool IsLittleEndian = sys::IsLittleEndianHost);
44
45} // end namespace DWARFYAML
46
47} // end namespace llvm
48
49#endif // LLVM_OBJECTYAML_DWARFEMITTER_H