LLVM 19.0.0git
Classes | Namespaces | Functions
COFFEmitter.cpp File Reference

The COFF component of yaml2obj. More...

#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/DebugInfo/CodeView/DebugStringTableSubsection.h"
#include "llvm/DebugInfo/CodeView/StringsAndChecksums.h"
#include "llvm/ObjectYAML/ObjectYAML.h"
#include "llvm/ObjectYAML/yaml2obj.h"
#include "llvm/Support/BinaryStreamWriter.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"
#include <optional>
#include <vector>

Go to the source code of this file.


struct  binary_le_impl< value_type >
struct  zeros_impl< NumBytes >


namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
namespace  llvm::yaml


static bool layoutOptionalHeader (COFFParser &CP)
static yaml::BinaryRef toDebugS (ArrayRef< CodeViewYAML::YAMLDebugSubsection > Subsections, const codeview::StringsAndChecksums &SC, BumpPtrAllocator &Allocator)
static bool layoutCOFF (COFFParser &CP)
template<typename value_type >
raw_ostreamoperator<< (raw_ostream &OS, const binary_le_impl< value_type > &BLE)
template<typename value_type >
binary_le_impl< value_type > binary_le (value_type V)
template<size_t NumBytes>
raw_ostreamoperator<< (raw_ostream &OS, const zeros_impl< NumBytes > &)
template<typename T >
zeros_impl< sizeof(T)> zeros (const T &)
template<typename T >
static uint32_t initializeOptionalHeader (COFFParser &CP, uint16_t Magic, T Header)
static bool writeCOFF (COFFParser &CP, raw_ostream &OS)
template<typename T >
static void writeLoadConfig (T &S, raw_ostream &OS)
bool llvm::yaml::yaml2coff (COFFYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)

Detailed Description

The COFF component of yaml2obj.

Definition in file COFFEmitter.cpp.

Function Documentation

◆ binary_le()

template<typename value_type >
binary_le_impl< value_type > binary_le ( value_type  V)

Definition at line 324 of file COFFEmitter.cpp.

Referenced by llvm::COFFYAML::SectionDataEntry::writeAsBinary(), and writeCOFF().

◆ initializeOptionalHeader()

template<typename T >
static uint32_t initializeOptionalHeader ( COFFParser &  CP,
uint16_t  Magic,
T  Header 

◆ layoutCOFF()

static bool layoutCOFF ( COFFParser &  CP)

◆ layoutOptionalHeader()

static bool layoutOptionalHeader ( COFFParser &  CP)

Definition at line 157 of file COFFEmitter.cpp.

Referenced by llvm::yaml::yaml2coff().

◆ operator<<() [1/2]

template<typename value_type >
raw_ostream & operator<< ( raw_ostream OS,
const binary_le_impl< value_type > &  BLE 

◆ operator<<() [2/2]

template<size_t NumBytes>
raw_ostream & operator<< ( raw_ostream OS,
const zeros_impl< NumBytes > &   

Definition at line 331 of file COFFEmitter.cpp.

References OS, and llvm::raw_ostream::write().

◆ toDebugS()

static yaml::BinaryRef toDebugS ( ArrayRef< CodeViewYAML::YAMLDebugSubsection Subsections,
const codeview::StringsAndChecksums SC,
BumpPtrAllocator Allocator 

◆ writeCOFF()

static bool writeCOFF ( COFFParser &  CP,
raw_ostream OS 

◆ writeLoadConfig()

template<typename T >
static void writeLoadConfig ( T S,
raw_ostream OS 

◆ zeros()

template<typename T >
zeros_impl< sizeof(T)> zeros ( const T )

Definition at line 338 of file COFFEmitter.cpp.

Referenced by writeCOFF().