From 75b55475bcc446e780125739a9e46854babc1887 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Tue, 10 Jun 2014 18:11:20 +0000 Subject: [PATCH] Remove the cached little endian variable. We can get it easily off of the DataLayout. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210555 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AArch64/AArch64Subtarget.cpp | 6 +++--- lib/Target/AArch64/AArch64Subtarget.h | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/Target/AArch64/AArch64Subtarget.cpp b/lib/Target/AArch64/AArch64Subtarget.cpp index cf6d08f2380..e68f5276b57 100644 --- a/lib/Target/AArch64/AArch64Subtarget.cpp +++ b/lib/Target/AArch64/AArch64Subtarget.cpp @@ -36,14 +36,14 @@ AArch64Subtarget::AArch64Subtarget(const std::string &TT, : AArch64GenSubtargetInfo(TT, CPU, FS), ARMProcFamily(Others), HasFPARMv8(false), HasNEON(false), HasCrypto(false), HasCRC(false), HasZeroCycleRegMove(false), HasZeroCycleZeroing(false), CPUString(CPU), - TargetTriple(TT), IsLittleEndian(LittleEndian), + TargetTriple(TT), // This nested ternary is horrible, but DL needs to be properly // initialized // before TLInfo is constructed. DL(isTargetMachO() ? "e-m:o-i64:64-i128:128-n32:64-S128" - : (IsLittleEndian ? "e-m:e-i64:64-i128:128-n32:64-S128" - : "E-m:e-i64:64-i128:128-n32:64-S128")), + : (LittleEndian ? "e-m:e-i64:64-i128:128-n32:64-S128" + : "E-m:e-i64:64-i128:128-n32:64-S128")), FrameLowering() { // Determine default and user-specified characteristics diff --git a/lib/Target/AArch64/AArch64Subtarget.h b/lib/Target/AArch64/AArch64Subtarget.h index 117963903bb..5de701b725f 100644 --- a/lib/Target/AArch64/AArch64Subtarget.h +++ b/lib/Target/AArch64/AArch64Subtarget.h @@ -51,9 +51,6 @@ protected: /// TargetTriple - What processor and OS we're targeting. Triple TargetTriple; - /// IsLittleEndian - Is the target little endian? - bool IsLittleEndian; - const DataLayout DL; AArch64FrameLowering FrameLowering; @@ -78,7 +75,7 @@ public: bool hasCrypto() const { return HasCrypto; } bool hasCRC() const { return HasCRC; } - bool isLittleEndian() const { return IsLittleEndian; } + bool isLittleEndian() const { return DL.isLittleEndian(); } bool isTargetDarwin() const { return TargetTriple.isOSDarwin(); }