From 0ea18ff8e78fd10ba210c70ca928b47c7de0e6b0 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 24 Jan 2007 03:41:36 +0000 Subject: [PATCH] Add a field for and construction of the PPCMachOWriterInfo object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33480 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPCTargetMachine.cpp | 2 +- lib/Target/PowerPC/PPCTargetMachine.h | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) 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); -- 2.34.1