LLVM  10.0.0svn
Classes | Namespaces | Enumerations | 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/ADT/StringSwitch.h"
#include "llvm/DebugInfo/CodeView/DebugStringTableSubsection.h"
#include "llvm/DebugInfo/CodeView/StringsAndChecksums.h"
#include "llvm/Object/COFF.h"
#include "llvm/ObjectYAML/ObjectYAML.h"
#include "llvm/ObjectYAML/yaml2obj.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 <vector>
Include dependency graph for COFFEmitter.cpp:

Go to the source code of this file.

Classes

struct  binary_le_impl< value_type >
 
struct  zeros_impl< NumBytes >
 

Namespaces

 llvm
 This class represents lattice values for constants.
 
 llvm::yaml
 

Enumerations

enum  
 

Functions

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)
 
bool llvm::yaml::yaml2coff (COFFYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH)
 

Detailed Description

The COFF component of yaml2obj.

Definition in file COFFEmitter.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Definition at line 162 of file COFFEmitter.cpp.

Function Documentation

◆ binary_le()

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

Definition at line 329 of file COFFEmitter.cpp.

Referenced by writeCOFF().

◆ initializeOptionalHeader()

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

◆ layoutCOFF()

static bool layoutCOFF ( COFFParser &  CP)
static

◆ layoutOptionalHeader()

static bool layoutOptionalHeader ( COFFParser &  CP)
static

Definition at line 168 of file COFFEmitter.cpp.

References llvm::COFF::NUM_DATA_DIRECTORIES.

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 336 of file COFFEmitter.cpp.

◆ toDebugS()

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

Definition at line 180 of file COFFEmitter.cpp.

Referenced by layoutCOFF().

◆ writeCOFF()

static bool writeCOFF ( COFFParser &  CP,
raw_ostream OS 
)
static

◆ zeros()

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

Definition at line 343 of file COFFEmitter.cpp.

Referenced by writeCOFF().