X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FAArch64%2FAArch64TargetMachine.cpp;h=f0ee66496763cc1de1deca132ac7046df86d2a00;hb=f0e3a9c174138ed77f0e5280b5fa735e9b6d5202;hp=2b5625dc09e38946de47e517ea669d2d6f52c9c5;hpb=4bedcbcab359bec94e072fb8dfd10d7bc37f7ed3;p=oota-llvm.git diff --git a/lib/Target/AArch64/AArch64TargetMachine.cpp b/lib/Target/AArch64/AArch64TargetMachine.cpp index 2b5625dc09e..f0ee6649676 100644 --- a/lib/Target/AArch64/AArch64TargetMachine.cpp +++ b/lib/Target/AArch64/AArch64TargetMachine.cpp @@ -115,9 +115,8 @@ static std::unique_ptr 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();