Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/include/llvm/Object/MachOUniversalWriter.h
Show All 10 Lines | |||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
#ifndef LLVM_OBJECT_MACHOUNIVERSALWRITER_H | #ifndef LLVM_OBJECT_MACHOUNIVERSALWRITER_H | ||||
#define LLVM_OBJECT_MACHOUNIVERSALWRITER_H | #define LLVM_OBJECT_MACHOUNIVERSALWRITER_H | ||||
#include "llvm/Object/Archive.h" | #include "llvm/Object/Archive.h" | ||||
#include "llvm/Object/Binary.h" | #include "llvm/Object/Binary.h" | ||||
#include "llvm/Object/MachO.h" | #include "llvm/Object/MachO.h" | ||||
smeenai: Nit: how come you're including the header here instead of forward declaring `IRObjectFile`? | |||||
Nice catch! Fixed in the new diff aguinet: Nice catch! Fixed in the new diff | |||||
namespace llvm { | namespace llvm { | ||||
class LLVMContext; | |||||
namespace object { | namespace object { | ||||
class IRObjectFile; | |||||
class Slice { | class Slice { | ||||
const Binary *B; | const Binary *B; | ||||
uint32_t CPUType; | uint32_t CPUType; | ||||
uint32_t CPUSubType; | uint32_t CPUSubType; | ||||
std::string ArchName; | std::string ArchName; | ||||
// P2Alignment field stores slice alignment values from universal | // P2Alignment field stores slice alignment values from universal | ||||
// binaries. This is also needed to order the slices so the total | // binaries. This is also needed to order the slices so the total | ||||
// file size can be calculated before creating the output buffer. | // file size can be calculated before creating the output buffer. | ||||
uint32_t P2Alignment; | uint32_t P2Alignment; | ||||
Slice(const IRObjectFile *IRO, uint32_t CPUType, uint32_t CPUSubType, | |||||
std::string ArchName, uint32_t Align); | |||||
public: | public: | ||||
explicit Slice(const MachOObjectFile &O); | explicit Slice(const MachOObjectFile &O); | ||||
Slice(const MachOObjectFile &O, uint32_t Align); | Slice(const MachOObjectFile &O, uint32_t Align); | ||||
static Expected<Slice> create(const Archive *A); | static Expected<Slice> create(const Archive *A, | ||||
LLVMContext *LLVMCtx = nullptr); | |||||
static Expected<Slice> create(const IRObjectFile *IRO, uint32_t Align); | |||||
void setP2Alignment(uint32_t Align) { P2Alignment = Align; } | void setP2Alignment(uint32_t Align) { P2Alignment = Align; } | ||||
const Binary *getBinary() const { return B; } | const Binary *getBinary() const { return B; } | ||||
uint32_t getCPUType() const { return CPUType; } | uint32_t getCPUType() const { return CPUType; } | ||||
uint32_t getCPUSubType() const { return CPUSubType; } | uint32_t getCPUSubType() const { return CPUSubType; } | ||||
Show All 36 Lines |
Nit: how come you're including the header here instead of forward declaring IRObjectFile?