diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp index 11f334725e1..f23b022368b 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -87,7 +87,7 @@ PPCTargetMachine::PPCTargetMachine(const Module &M, const std::string &FS, : Subtarget(*this, M, FS, is64Bit), DataLayout(Subtarget.getTargetDataString()), InstrInfo(*this), FrameInfo(*this, is64Bit), JITInfo(*this, is64Bit), TLInfo(*this), - InstrItins(Subtarget.getInstrItineraryData()) { + InstrItins(Subtarget.getInstrItineraryData()), MachOWriterInfo(*this) { if (getRelocationModel() == Reloc::Default) if (Subtarget.isDarwin()) diff --git a/lib/Target/PowerPC/PPCTargetMachine.h b/lib/Target/PowerPC/PPCTargetMachine.h index 777772e1fae..af35cc59233 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.h +++ b/lib/Target/PowerPC/PPCTargetMachine.h @@ -19,6 +19,7 @@ #include "PPCJITInfo.h" #include "PPCInstrInfo.h" #include "PPCISelLowering.h" +#include "PPCMachOWriterInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetData.h" @@ -36,7 +37,8 @@ class PPCTargetMachine : public LLVMTargetMachine { PPCJITInfo JITInfo; PPCTargetLowering TLInfo; InstrItineraryData InstrItins; - + PPCMachOWriterInfo MachOWriterInfo; + protected: virtual const TargetAsmInfo *createTargetAsmInfo() const; @@ -58,6 +60,9 @@ public: virtual const InstrItineraryData getInstrItineraryData() const { return InstrItins; } + virtual const PPCMachOWriterInfo *getMachOWriterInfo() const { + return &MachOWriterInfo; + } // Pass Pipeline Configuration virtual bool addInstSelector(FunctionPassManager &PM, bool Fast);