#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>
usingnamespacellvm;
namespace {
struct COFFParser { … };
enum { … };
}
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> struct binary_le_impl { … };
template <typename value_type>
raw_ostream &operator<<(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> struct zeros_impl { … };
template <size_t NumBytes>
raw_ostream &operator<<(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) { … }
size_t COFFYAML::SectionDataEntry::size() const { … }
template <typename T> static void writeLoadConfig(T &S, raw_ostream &OS) { … }
void COFFYAML::SectionDataEntry::writeAsBinary(raw_ostream &OS) const { … }
namespace llvm {
namespace yaml {
bool yaml2coff(llvm::COFFYAML::Object &Doc, raw_ostream &Out,
ErrorHandler ErrHandler) { … }
}
}