LLVM  14.0.0git
Namespaces | Macros | Functions
MachOEmitter.cpp File Reference
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/ObjectYAML/DWARFEmitter.h"
#include "llvm/ObjectYAML/ObjectYAML.h"
#include "llvm/ObjectYAML/yaml2obj.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/LEB128.h"
#include "llvm/Support/YAMLTraits.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/Format.h"
#include "llvm/BinaryFormat/MachO.def"
Include dependency graph for MachOEmitter.cpp:

Go to the source code of this file.

Namespaces

 llvm
 This file implements support for optimizing divisions by a constant.
 
 llvm::yaml
 

Macros

#define HANDLE_LOAD_COMMAND(LCName, LCValue, LCStruct)
 

Functions

bool llvm::yaml::yaml2macho (YamlObjectFile &Doc, raw_ostream &Out, ErrorHandler EH)
 

Detailed Description

The Mach component of yaml2obj.

Definition in file MachOEmitter.cpp.

Macro Definition Documentation

◆ HANDLE_LOAD_COMMAND

#define HANDLE_LOAD_COMMAND (   LCName,
  LCValue,
  LCStruct 
)
Value:
case MachO::LCName: \
if (Obj.IsLittleEndian != sys::IsLittleEndianHost) \
MachO::swapStruct(Data.LCStruct##_data); \
OS.write(reinterpret_cast<const char *>(&(Data.LCStruct##_data)), \
sizeof(MachO::LCStruct)); \
BytesWritten = sizeof(MachO::LCStruct); \
BytesWritten += \
writeLoadCommandData<MachO::LCStruct>(LC, OS, Obj.IsLittleEndian); \
break;
llvm::Data
@ Data
Definition: SIMachineScheduler.h:55
llvm::sys::IsLittleEndianHost
static const bool IsLittleEndianHost
Definition: SwapByteOrder.h:101
llvm::MachO::swapStruct
void swapStruct(fat_header &mh)
Definition: MachO.h:1005