summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2015-06-11 15:34:59 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2015-06-11 15:34:59 +0000
commited64d62c70414db501f7bdda8dcf0b4fa0dd8bcc (patch)
tree919a068d98605c84fe33027bd6a662dc938760eb /llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
parentfd5286717c7be8a632f6ffc954eeda7dbc21d540 (diff)
downloadbcm5719-llvm-ed64d62c70414db501f7bdda8dcf0b4fa0dd8bcc.tar.gz
bcm5719-llvm-ed64d62c70414db501f7bdda8dcf0b4fa0dd8bcc.zip
Replace string GNU Triples with llvm::Triple in computeDataLayout(). 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, jfb, rengolin Differential Revision: http://reviews.llvm.org/D10361 llvm-svn: 239538
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/AArch64/AArch64TargetMachine.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
index 2b5625dc09e..f0ee6649676 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
@@ -115,9 +115,8 @@ static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
}
// Helper function to build a DataLayout string
-static std::string computeDataLayout(StringRef TT, bool LittleEndian) {
- Triple Triple(TT);
- if (Triple.isOSBinFormatMachO())
+static std::string computeDataLayout(const Triple &TT, bool LittleEndian) {
+ if (TT.isOSBinFormatMachO())
return "e-m:o-i64:64-i128:128-n32:64-S128";
if (LittleEndian)
return "e-m:e-i64:64-i128:128-n32:64-S128";
@@ -134,8 +133,8 @@ AArch64TargetMachine::AArch64TargetMachine(const Target &T, StringRef TT,
bool LittleEndian)
// This nested ternary is horrible, but DL needs to be properly
// initialized before TLInfo is constructed.
- : LLVMTargetMachine(T, computeDataLayout(TT, LittleEndian), TT, CPU, FS,
- Options, RM, CM, OL),
+ : LLVMTargetMachine(T, computeDataLayout(Triple(TT), LittleEndian), TT, CPU,
+ FS, Options, RM, CM, OL),
TLOF(createTLOF(Triple(getTargetTriple()))),
isLittle(LittleEndian) {
initAsmInfo();
OpenPOWER on IntegriCloud