[lld] r298242 - [ELF] - Reuse Config->IsLE. NFC.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 20 03:16:58 PDT 2017
Author: grimar
Date: Mon Mar 20 05:16:57 2017
New Revision: 298242
URL: http://llvm.org/viewvc/llvm-project?rev=298242&view=rev
Log:
[ELF] - Reuse Config->IsLE. NFC.
Modified:
lld/trunk/ELF/LinkerScript.cpp
Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=298242&r1=298241&r2=298242&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Mon Mar 20 05:16:57 2017
@@ -962,10 +962,7 @@ uint32_t LinkerScriptBase::getFiller(Str
}
static void writeInt(uint8_t *Buf, uint64_t Data, uint64_t Size) {
- const endianness E =
- (Config->EKind == ELF32LEKind || Config->EKind == ELF64LEKind)
- ? llvm::support::endianness::little
- : llvm::support::endianness::big;
+ const endianness E = Config->IsLE ? endianness::little : endianness::big;
switch (Size) {
case 1:
More information about the llvm-commits
mailing list