diff options
author | Daniel Sanders <daniel.sanders@imgtec.com> | 2015-06-16 13:15:50 +0000 |
---|---|---|
committer | Daniel Sanders <daniel.sanders@imgtec.com> | 2015-06-16 13:15:50 +0000 |
commit | 335487ad873797c2a44747d1c9442baa67fa8d74 (patch) | |
tree | d21985f15f444d676384f36b175fc7ec719dd86e /llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | |
parent | 5220476a43ba3d1847e2567db9b41f403a14e040 (diff) | |
download | bcm5719-llvm-335487ad873797c2a44747d1c9442baa67fa8d74.tar.gz bcm5719-llvm-335487ad873797c2a44747d1c9442baa67fa8d74.zip |
Replace string GNU Triples with llvm::Triple in TargetMachine::getTargetTriple(). NFC.
Summary:
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: llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D10381
llvm-svn: 239815
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCTargetMachine.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp index 60cca2d4d13..b9ae5b66b81 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -98,13 +98,12 @@ static std::string getDataLayoutString(const Triple &T) { return Ret; } -static std::string computeFSAdditions(StringRef FS, CodeGenOpt::Level OL, StringRef TT) { +static std::string computeFSAdditions(StringRef FS, CodeGenOpt::Level OL, + const Triple &TT) { std::string FullFS = FS; - Triple TargetTriple(TT); // Make sure 64-bit features are available when CPUname is generic - if (TargetTriple.getArch() == Triple::ppc64 || - TargetTriple.getArch() == Triple::ppc64le) { + if (TT.getArch() == Triple::ppc64 || TT.getArch() == Triple::ppc64le) { if (!FullFS.empty()) FullFS = "+64bit," + FullFS; else @@ -171,8 +170,7 @@ PPCTargetMachine::PPCTargetMachine(const Target &T, const Triple &TT, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL) : LLVMTargetMachine(T, getDataLayoutString(TT), TT, CPU, - computeFSAdditions(FS, OL, TT.str()), Options, RM, CM, - OL), + computeFSAdditions(FS, OL, TT), Options, RM, CM, OL), TLOF(createTLOF(Triple(getTargetTriple()))), TargetABI(computeTargetABI(TT, Options)) { initAsmInfo(); |