LLVM  14.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);
36 Error emitDebugPubnames(raw_ostream &OS, const Data &DI);
37 Error emitDebugPubtypes(raw_ostream &OS, const Data &DI);
40 Error emitDebugInfo(raw_ostream &OS, const Data &DI);
41 Error emitDebugLine(raw_ostream &OS, const Data &DI);
42 Error emitDebugAddr(raw_ostream &OS, const Data &DI);
44 Error emitDebugRnglists(raw_ostream &OS, const Data &DI);
45 Error emitDebugLoclists(raw_ostream &OS, const Data &DI);
46 
50 emitDebugSections(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
MemoryBuffer.h
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::lltok::Error
@ Error
Definition: LLToken.h:21
StringRef.h
Host.h
Error.h
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:42
llvm::DWARFYAML::emitDebugAranges
Error emitDebugAranges(raw_ostream &OS, const Data &DI)
Definition: DWARFEmitter.cpp:140
llvm::DWARFYAML::emitDebugAbbrev
Error emitDebugAbbrev(raw_ostream &OS, const Data &DI)
Definition: DWARFEmitter.cpp:131
llvm::DWARFYAML::Data
Definition: DWARFYAML.h:210
llvm::DWARFYAML::emitDebugAddr
Error emitDebugAddr(raw_ostream &OS, const Data &DI)
Definition: DWARFEmitter.cpp:630
llvm::DWARFYAML::emitDebugPubtypes
Error emitDebugPubtypes(raw_ostream &OS, const Data &DI)
Definition: DWARFEmitter.cpp:247
llvm::DWARFYAML::emitDebugStrOffsets
Error emitDebugStrOffsets(raw_ostream &OS, const Data &DI)
Definition: DWARFEmitter.cpp:671
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
llvm::DWARFYAML::emitDebugInfo
Error emitDebugInfo(raw_ostream &OS, const Data &DI)
Definition: DWARFEmitter.cpp:406
StringMap.h
llvm::DWARFYAML::getDWARFEmitterByName
std::function< Error(raw_ostream &, const Data &)> getDWARFEmitterByName(StringRef SecName)
Definition: DWARFEmitter.h:48
llvm::DWARFYAML::PubSection
Definition: DWARFYAML.h:83
function
print Print MemDeps of function
Definition: MemDepPrinter.cpp:83
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::DWARFYAML::emitDebugLine
Error emitDebugLine(raw_ostream &OS, const Data &DI)
Definition: DWARFEmitter.cpp:569
llvm::DWARFYAML::emitDebugLoclists
Error emitDebugLoclists(raw_ostream &OS, const Data &DI)
Definition: DWARFEmitter.cpp:1001
llvm::DWARFYAML::emitDebugRnglists
Error emitDebugRnglists(raw_ostream &OS, const Data &DI)
Definition: DWARFEmitter.cpp:995
llvm::DWARFYAML::emitDebugPubnames
Error emitDebugPubnames(raw_ostream &OS, const Data &DI)
Definition: DWARFEmitter.cpp:242
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
llvm::DWARFYAML::emitDebugSections
Expected< StringMap< std::unique_ptr< MemoryBuffer > > > emitDebugSections(StringRef YAMLString, bool IsLittleEndian=sys::IsLittleEndianHost, bool Is64BitAddrSize=true)
Definition: DWARFEmitter.cpp:1052
llvm::DWARFYAML::emitDebugGNUPubnames
Error emitDebugGNUPubnames(raw_ostream &OS, const Data &DI)
Definition: DWARFEmitter.cpp:252
llvm::DWARFYAML::emitDebugRanges
Error emitDebugRanges(raw_ostream &OS, const Data &DI)
Definition: DWARFEmitter.cpp:189
llvm::sys::IsLittleEndianHost
static const bool IsLittleEndianHost
Definition: SwapByteOrder.h:101
llvm::DWARFYAML::emitDebugStr
Error emitDebugStr(raw_ostream &OS, const Data &DI)
Definition: DWARFEmitter.cpp:87
llvm::DWARFYAML::emitDebugGNUPubtypes
Error emitDebugGNUPubtypes(raw_ostream &OS, const Data &DI)
Definition: DWARFEmitter.cpp:258