//
// The LLVM Compiler Infrastructure
//
-// This file was developed by Bill Wendling and is distributed under the
-// University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
namespace llvm {
class MachineBasicBlock;
+ class OutputBuffer;
//===--------------------------------------------------------------------===//
// TargetMachOWriterInfo
//===--------------------------------------------------------------------===//
- struct TargetMachOWriterInfo {
+ class TargetMachOWriterInfo {
uint32_t CPUType; // CPU specifier
uint32_t CPUSubType; // Machine specifier
-
+ public:
// The various CPU_TYPE_* constants are already defined by at least one
// system header file and create compilation errors if not respected.
#if !defined(CPU_TYPE_I386)
TargetMachOWriterInfo(uint32_t cputype, uint32_t cpusubtype)
: CPUType(cputype), CPUSubType(cpusubtype) {}
- virtual ~TargetMachOWriterInfo() {}
+ virtual ~TargetMachOWriterInfo();
virtual MachineRelocation GetJTRelocation(unsigned Offset,
MachineBasicBlock *MBB) const;
- virtual const char *getPassName() const {
- return "Mach-O Writer";
- }
+ virtual unsigned GetTargetRelocation(MachineRelocation &MR,
+ unsigned FromIdx,
+ unsigned ToAddr,
+ unsigned ToIdx,
+ OutputBuffer &RelocOut,
+ OutputBuffer &SecOut,
+ bool Scattered,
+ bool Extern) const { return 0; }
+
+ uint32_t getCPUType() const { return CPUType; }
+ uint32_t getCPUSubType() const { return CPUSubType; }
};
} // end llvm namespace