diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-02 22:11:08 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-02 22:11:08 +0000 |
commit | 3be03406c9c3b2075d5ae416499af2f15f703d6f (patch) | |
tree | c44ecdea2343ba2b7689ee79d2e599483a48a4ac /lib/Target/CellSPU | |
parent | 1391cc19d0d0dec015bfc0130e4238cacd19fbf2 (diff) | |
download | llvm-3be03406c9c3b2075d5ae416499af2f15f703d6f.tar.gz llvm-3be03406c9c3b2075d5ae416499af2f15f703d6f.tar.bz2 llvm-3be03406c9c3b2075d5ae416499af2f15f703d6f.tar.xz |
Normalize Subtarget constructors to take a target triple string instead of
Module*.
Also, dropped uses of TargetMachine where unnecessary. The only target which
still takes a TargetMachine& is Mips, I would appreciate it if someone would
normalize this to match other targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77918 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CellSPU')
-rw-r--r-- | lib/Target/CellSPU/SPUSubtarget.cpp | 6 | ||||
-rw-r--r-- | lib/Target/CellSPU/SPUSubtarget.h | 9 | ||||
-rw-r--r-- | lib/Target/CellSPU/SPUTargetMachine.cpp | 2 |
3 files changed, 4 insertions, 13 deletions
diff --git a/lib/Target/CellSPU/SPUSubtarget.cpp b/lib/Target/CellSPU/SPUSubtarget.cpp index 0a1c2f75cf..0f18b7fa8b 100644 --- a/lib/Target/CellSPU/SPUSubtarget.cpp +++ b/lib/Target/CellSPU/SPUSubtarget.cpp @@ -13,15 +13,11 @@ #include "SPUSubtarget.h" #include "SPU.h" -#include "llvm/Module.h" -#include "llvm/Target/TargetMachine.h" #include "SPUGenSubtarget.inc" using namespace llvm; -SPUSubtarget::SPUSubtarget(const TargetMachine &tm, const Module &M, - const std::string &FS) : - TM(tm), +SPUSubtarget::SPUSubtarget(const std::string &TT, const std::string &FS) : StackAlignment(16), ProcDirective(SPU::DEFAULT_PROC), UseLargeMem(false) diff --git a/lib/Target/CellSPU/SPUSubtarget.h b/lib/Target/CellSPU/SPUSubtarget.h index b6a34099b2..94ac73ce39 100644 --- a/lib/Target/CellSPU/SPUSubtarget.h +++ b/lib/Target/CellSPU/SPUSubtarget.h @@ -20,9 +20,7 @@ #include <string> namespace llvm { - class Module; class GlobalValue; - class TargetMachine; namespace SPU { enum { @@ -33,8 +31,6 @@ namespace llvm { class SPUSubtarget : public TargetSubtarget { protected: - const TargetMachine &TM; - /// stackAlignment - The minimum alignment known to hold of the stack frame /// on entry to the function and which must be maintained by every function. unsigned StackAlignment; @@ -52,10 +48,9 @@ namespace llvm { public: /// This constructor initializes the data members to match that - /// of the specified module. + /// of the specified triple. /// - SPUSubtarget(const TargetMachine &TM, const Module &M, - const std::string &FS); + SPUSubtarget(const std::string &TT, const std::string &FS); /// ParseSubtargetFeatures - Parses features string setting specified /// subtarget options. Definition of function is auto generated by tblgen. diff --git a/lib/Target/CellSPU/SPUTargetMachine.cpp b/lib/Target/CellSPU/SPUTargetMachine.cpp index 340eb56f36..16b923b8ce 100644 --- a/lib/Target/CellSPU/SPUTargetMachine.cpp +++ b/lib/Target/CellSPU/SPUTargetMachine.cpp @@ -41,7 +41,7 @@ const TargetAsmInfo *SPUTargetMachine::createTargetAsmInfo() const { SPUTargetMachine::SPUTargetMachine(const Target &T, const Module &M, const std::string &FS) : LLVMTargetMachine(T), - Subtarget(*this, M, FS), + Subtarget(M.getTargetTriple(), FS), DataLayout(Subtarget.getTargetDataString()), InstrInfo(*this), FrameInfo(*this), |