LLVM 20.0.0git
Classes | Typedefs | Functions
MachOUniversalWriter.cpp File Reference
#include "llvm/Object/MachOUniversalWriter.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Object/Archive.h"
#include "llvm/Object/Binary.h"
#include "llvm/Object/IRObjectFile.h"
#include "llvm/Object/MachO.h"
#include "llvm/Object/MachOUniversal.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/MemoryBufferRef.h"
#include "llvm/Support/SwapByteOrder.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/Triple.h"

Go to the source code of this file.

Classes

struct  FatArchTraits< FatArchTy >
 
struct  FatArchTraits< MachO::fat_arch >
 
struct  FatArchTraits< MachO::fat_arch_64 >
 

Typedefs

using MachoCPUTy = std::pair< uint32_t, uint32_t >
 

Functions

static uint32_t calculateFileAlignment (const MachOObjectFile &O)
 
static uint32_t calculateAlignment (const MachOObjectFile &ObjectFile)
 
static Expected< MachoCPUTygetMachoCPUFromTriple (Triple TT)
 
static Expected< MachoCPUTygetMachoCPUFromTriple (StringRef TT)
 
static MachoCPUTy getMachoCPUFromObjectFile (const MachOObjectFile &O)
 
template<typename FatArchTy >
static Expected< SmallVector< FatArchTy, 2 > > buildFatArchList (ArrayRef< Slice > Slices)
 
template<typename FatArchTy >
static Error writeUniversalArchsToStream (MachO::fat_header FatHeader, ArrayRef< Slice > Slices, raw_ostream &Out)
 

Typedef Documentation

◆ MachoCPUTy

using MachoCPUTy = std::pair<uint32_t, uint32_t>

Definition at line 103 of file MachOUniversalWriter.cpp.

Function Documentation

◆ buildFatArchList()

template<typename FatArchTy >
static Expected< SmallVector< FatArchTy, 2 > > buildFatArchList ( ArrayRef< Slice Slices)
static

◆ calculateAlignment()

static uint32_t calculateAlignment ( const MachOObjectFile ObjectFile)
static

◆ calculateFileAlignment()

static uint32_t calculateFileAlignment ( const MachOObjectFile O)
static

◆ getMachoCPUFromObjectFile()

static MachoCPUTy getMachoCPUFromObjectFile ( const MachOObjectFile O)
static

Definition at line 120 of file MachOUniversalWriter.cpp.

Referenced by llvm::object::Slice::create().

◆ getMachoCPUFromTriple() [1/2]

static Expected< MachoCPUTy > getMachoCPUFromTriple ( StringRef  TT)
static

Definition at line 116 of file MachOUniversalWriter.cpp.

References getMachoCPUFromTriple().

◆ getMachoCPUFromTriple() [2/2]

static Expected< MachoCPUTy > getMachoCPUFromTriple ( Triple  TT)
static

◆ writeUniversalArchsToStream()

template<typename FatArchTy >
static Error writeUniversalArchsToStream ( MachO::fat_header  FatHeader,
ArrayRef< Slice Slices,
raw_ostream Out 
)
static