Move the getJTRelocation method out of here.
llvm-svn: 33479
This commit is contained in:
parent
4905a473e8
commit
56f1058309
|
|
@ -23,23 +23,11 @@ using namespace llvm;
|
|||
namespace {
|
||||
class VISIBILITY_HIDDEN PPCMachOWriter : public MachOWriter {
|
||||
public:
|
||||
PPCMachOWriter(std::ostream &O, PPCTargetMachine &TM) : MachOWriter(O, TM) {
|
||||
if (TM.getTargetData()->getPointerSizeInBits() == 64) {
|
||||
Header.cputype = MachOHeader::HDR_CPU_TYPE_POWERPC64;
|
||||
} else {
|
||||
Header.cputype = MachOHeader::HDR_CPU_TYPE_POWERPC;
|
||||
}
|
||||
Header.cpusubtype = MachOHeader::HDR_CPU_SUBTYPE_POWERPC_ALL;
|
||||
}
|
||||
PPCMachOWriter(std::ostream &O, PPCTargetMachine &TM)
|
||||
: MachOWriter(O, TM) {}
|
||||
|
||||
virtual void GetTargetRelocation(MachineRelocation &MR, MachOSection &From,
|
||||
MachOSection &To);
|
||||
virtual MachineRelocation GetJTRelocation(unsigned Offset,
|
||||
MachineBasicBlock *MBB);
|
||||
|
||||
virtual const char *getPassName() const {
|
||||
return "PowerPC Mach-O Writer";
|
||||
}
|
||||
|
||||
// Constants for the relocation r_type field.
|
||||
// see <mach-o/ppc/reloc.h>
|
||||
|
|
@ -165,10 +153,3 @@ void PPCMachOWriter::GetTargetRelocation(MachineRelocation &MR,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
MachineRelocation PPCMachOWriter::GetJTRelocation(unsigned Offset,
|
||||
MachineBasicBlock *MBB) {
|
||||
// FIXME: do something about PIC
|
||||
return MachineRelocation::getBB(Offset, PPC::reloc_vanilla, MBB);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue