LLVM  11.0.0git
DWARFEmitter.h
Go to the documentation of this file.
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/Host.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 
31 Error emitDebugAbbrev(raw_ostream &OS, const Data &DI);
32 Error emitDebugStr(raw_ostream &OS, const Data &DI);
33 
34 Error emitDebugAranges(raw_ostream &OS, const Data &DI);
35 Error emitDebugRanges(raw_ostream &OS, const Data &DI);
37  bool IsLittleEndian, bool IsGNUPubSec = false);
38 Error emitDebugInfo(raw_ostream &OS, const Data &DI);
39 Error emitDebugLine(raw_ostream &OS, const Data &DI);
40 Error emitDebugAddr(raw_ostream &OS, const Data &DI);
41 
43 emitDebugSections(StringRef YAMLString, bool ApplyFixups = false,
44  bool IsLittleEndian = sys::IsLittleEndianHost);
45 } // end namespace DWARFYAML
46 } // end namespace llvm
47 
48 #endif // LLVM_OBJECTYAML_DWARFEMITTER_H
Error emitDebugRanges(raw_ostream &OS, const Data &DI)
This class represents lattice values for constants.
Definition: AllocatorList.h:23
Tagged union holding either a T or a Error.
Definition: APFloat.h:42
static const bool IsLittleEndianHost
Definition: SwapByteOrder.h:97
Error emitDebugInfo(raw_ostream &OS, const Data &DI)
Error emitDebugAbbrev(raw_ostream &OS, const Data &DI)
Error emitPubSection(raw_ostream &OS, const PubSection &Sect, bool IsLittleEndian, bool IsGNUPubSec=false)
Error emitDebugStr(raw_ostream &OS, const Data &DI)
Error emitDebugLine(raw_ostream &OS, const Data &DI)
Expected< StringMap< std::unique_ptr< MemoryBuffer > > > emitDebugSections(StringRef YAMLString, bool ApplyFixups=false, bool IsLittleEndian=sys::IsLittleEndianHost)
Error emitDebugAddr(raw_ostream &OS, const Data &DI)
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:46
Error emitDebugAranges(raw_ostream &OS, const Data &DI)
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:57