diff options
| author | Daniel Sanders <daniel.sanders@imgtec.com> | 2015-06-11 19:41:26 +0000 |
|---|---|---|
| committer | Daniel Sanders <daniel.sanders@imgtec.com> | 2015-06-11 19:41:26 +0000 |
| commit | 3e5de88dacfec7ce74b7230be8e392b53d83b050 (patch) | |
| tree | d869b3627be991308573cad1e78fccceb9549d56 /llvm/lib/Target/R600 | |
| parent | c88bf54366f19d849b0b23f1ec6037e10fbc0d05 (diff) | |
| download | bcm5719-llvm-3e5de88dacfec7ce74b7230be8e392b53d83b050.tar.gz bcm5719-llvm-3e5de88dacfec7ce74b7230be8e392b53d83b050.zip | |
Replace string GNU Triples with llvm::Triple in TargetMachine. NFC.
Summary:
For the moment, TargetMachine::getTargetTriple() still returns a StringRef.
This continues the patch series to eliminate StringRef forms of GNU triples
from the internals of LLVM that began in r239036.
Reviewers: rengolin
Reviewed By: rengolin
Subscribers: ted, llvm-commits, rengolin, jholewinski
Differential Revision: http://reviews.llvm.org/D10362
llvm-svn: 239554
Diffstat (limited to 'llvm/lib/Target/R600')
| -rw-r--r-- | llvm/lib/Target/R600/AMDGPUTargetMachine.cpp | 29 | ||||
| -rw-r--r-- | llvm/lib/Target/R600/AMDGPUTargetMachine.h | 10 |
2 files changed, 20 insertions, 19 deletions
diff --git a/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp b/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp index bb5d9e99ff4..d65c010888a 100644 --- a/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp +++ b/llvm/lib/Target/R600/AMDGPUTargetMachine.cpp @@ -65,15 +65,15 @@ static std::string computeDataLayout(const Triple &TT) { return Ret; } -AMDGPUTargetMachine::AMDGPUTargetMachine(const Target &T, StringRef TT, +AMDGPUTargetMachine::AMDGPUTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, TargetOptions Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OptLevel) - : LLVMTargetMachine(T, computeDataLayout(Triple(TT)), TT, CPU, FS, Options, - RM, CM, OptLevel), - TLOF(new TargetLoweringObjectFileELF()), - Subtarget(Triple(TT), CPU, FS, *this), IntrinsicInfo() { + : LLVMTargetMachine(T, computeDataLayout(TT), TT, CPU, FS, Options, RM, CM, + OptLevel), + TLOF(new TargetLoweringObjectFileELF()), Subtarget(TT, CPU, FS, *this), + IntrinsicInfo() { setRequiresStructuredCFG(true); initAsmInfo(); } @@ -86,20 +86,21 @@ AMDGPUTargetMachine::~AMDGPUTargetMachine() { // R600 Target Machine (R600 -> Cayman) //===----------------------------------------------------------------------===// -R600TargetMachine::R600TargetMachine(const Target &T, StringRef TT, StringRef FS, - StringRef CPU, TargetOptions Options, Reloc::Model RM, - CodeModel::Model CM, CodeGenOpt::Level OL) : - AMDGPUTargetMachine(T, TT, FS, CPU, Options, RM, CM, OL) { } - +R600TargetMachine::R600TargetMachine(const Target &T, const Triple &TT, + StringRef FS, StringRef CPU, + TargetOptions Options, Reloc::Model RM, + CodeModel::Model CM, CodeGenOpt::Level OL) + : AMDGPUTargetMachine(T, TT, FS, CPU, Options, RM, CM, OL) {} //===----------------------------------------------------------------------===// // GCN Target Machine (SI+) //===----------------------------------------------------------------------===// -GCNTargetMachine::GCNTargetMachine(const Target &T, StringRef TT, StringRef FS, - StringRef CPU, TargetOptions Options, Reloc::Model RM, - CodeModel::Model CM, CodeGenOpt::Level OL) : - AMDGPUTargetMachine(T, TT, FS, CPU, Options, RM, CM, OL) { } +GCNTargetMachine::GCNTargetMachine(const Target &T, const Triple &TT, + StringRef FS, StringRef CPU, + TargetOptions Options, Reloc::Model RM, + CodeModel::Model CM, CodeGenOpt::Level OL) + : AMDGPUTargetMachine(T, TT, FS, CPU, Options, RM, CM, OL) {} //===----------------------------------------------------------------------===// // AMDGPU Pass Setup diff --git a/llvm/lib/Target/R600/AMDGPUTargetMachine.h b/llvm/lib/Target/R600/AMDGPUTargetMachine.h index 785c119a102..14792e347a7 100644 --- a/llvm/lib/Target/R600/AMDGPUTargetMachine.h +++ b/llvm/lib/Target/R600/AMDGPUTargetMachine.h @@ -37,7 +37,7 @@ protected: AMDGPUIntrinsicInfo IntrinsicInfo; public: - AMDGPUTargetMachine(const Target &T, StringRef TT, StringRef FS, + AMDGPUTargetMachine(const Target &T, const Triple &TT, StringRef FS, StringRef CPU, TargetOptions Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL); ~AMDGPUTargetMachine(); @@ -63,7 +63,7 @@ public: class R600TargetMachine : public AMDGPUTargetMachine { public: - R600TargetMachine(const Target &T, StringRef TT, StringRef FS, + R600TargetMachine(const Target &T, const Triple &TT, StringRef FS, StringRef CPU, TargetOptions Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL); @@ -77,9 +77,9 @@ public: class GCNTargetMachine : public AMDGPUTargetMachine { public: - GCNTargetMachine(const Target &T, StringRef TT, StringRef FS, - StringRef CPU, TargetOptions Options, Reloc::Model RM, - CodeModel::Model CM, CodeGenOpt::Level OL); + GCNTargetMachine(const Target &T, const Triple &TT, StringRef FS, + StringRef CPU, TargetOptions Options, Reloc::Model RM, + CodeModel::Model CM, CodeGenOpt::Level OL); TargetPassConfig *createPassConfig(PassManagerBase &PM) override; }; |

