blob: 2ccc876d502383a463dd5c337d16d8860ce22ef6 [file] [log] [blame]
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01001//===--- DWARFEmitter.h - ---------------------------------------*- C++ -*-===//
2//
Andrew Walbran16937d02019-10-22 13:54:20 +01003// 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 Scull5e1ddfa2018-08-14 10:06:54 +01006//
7//===----------------------------------------------------------------------===//
8/// \file
Andrew Scullcdfcccc2018-10-05 20:58:37 +01009/// Common declarations for yaml2obj
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010010//===----------------------------------------------------------------------===//
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
22namespace llvm {
23
24class raw_ostream;
25
26namespace DWARFYAML {
27
28struct Data;
29struct PubSection;
30
31void EmitDebugAbbrev(raw_ostream &OS, const Data &DI);
32void EmitDebugStr(raw_ostream &OS, const Data &DI);
33
34void EmitDebugAranges(raw_ostream &OS, const Data &DI);
35void EmitPubSection(raw_ostream &OS, const PubSection &Sect,
36 bool IsLittleEndian);
37void EmitDebugInfo(raw_ostream &OS, const Data &DI);
38void EmitDebugLine(raw_ostream &OS, const Data &DI);
39
40Expected<StringMap<std::unique_ptr<MemoryBuffer>>>
Andrew Scullcdfcccc2018-10-05 20:58:37 +010041EmitDebugSections(StringRef YAMLString, bool ApplyFixups = false,
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010042 bool IsLittleEndian = sys::IsLittleEndianHost);
Andrew Scullcdfcccc2018-10-05 20:58:37 +010043StringMap<std::unique_ptr<MemoryBuffer>>
44EmitDebugSections(llvm::DWARFYAML::Data &DI, bool ApplyFixups);
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010045
46} // end namespace DWARFYAML
Andrew Scull5e1ddfa2018-08-14 10:06:54 +010047} // end namespace llvm
48
49#endif // LLVM_OBJECTYAML_DWARFEMITTER_H