mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 19:25:00 +00:00
MC/Mach-O: Lift some MachObjectWriter arguments into the target specific
interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121981 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -11,15 +11,30 @@
|
||||
#define LLVM_MC_MCMACHOBJECTWRITER_H
|
||||
|
||||
#include "llvm/MC/MCObjectWriter.h"
|
||||
#include "llvm/Support/DataTypes.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class MCMachObjectTargetWriter {
|
||||
const unsigned Is64Bit : 1;
|
||||
const uint32_t CPUType;
|
||||
const uint32_t CPUSubtype;
|
||||
|
||||
protected:
|
||||
MCMachObjectTargetWriter();
|
||||
MCMachObjectTargetWriter(bool Is64Bit_, uint32_t CPUType_,
|
||||
uint32_t CPUSubtype_);
|
||||
|
||||
public:
|
||||
virtual ~MCMachObjectTargetWriter();
|
||||
|
||||
/// @name Accessors
|
||||
/// @{
|
||||
|
||||
bool is64Bit() const { return Is64Bit; }
|
||||
uint32_t getCPUType() const { return CPUType; }
|
||||
uint32_t getCPUSubtype() const { return CPUSubtype; }
|
||||
|
||||
/// @}
|
||||
};
|
||||
|
||||
/// \brief Construct a new Mach-O writer instance.
|
||||
@@ -30,9 +45,7 @@ public:
|
||||
/// \param OS - The stream to write to.
|
||||
/// \returns The constructed object writer.
|
||||
MCObjectWriter *createMachObjectWriter(MCMachObjectTargetWriter *MOTW,
|
||||
raw_ostream &OS, bool is64Bit,
|
||||
uint32_t CPUType, uint32_t CPUSubtype,
|
||||
bool IsLittleEndian);
|
||||
raw_ostream &OS, bool IsLittleEndian);
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
|
Reference in New Issue
Block a user