[lld] r342685 - Simplify. NFC.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 20 14:18:56 PDT 2018


Author: ruiu
Date: Thu Sep 20 14:18:56 2018
New Revision: 342685

URL: http://llvm.org/viewvc/llvm-project?rev=342685&view=rev
Log:
Simplify. NFC.

Modified:
    lld/trunk/ELF/Driver.cpp

Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=342685&r1=342684&r2=342685&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Thu Sep 20 14:18:56 2018
@@ -973,10 +973,6 @@ static void setConfigs(opt::InputArgList
   Config->Pic = Config->Pie || Config->Shared;
   Config->Wordsize = Config->Is64 ? 8 : 4;
 
-  // There is an ILP32 ABI for x86-64, although it's not very popular.
-  // It is called the x32 ABI.
-  bool IsX32 = (Kind == ELF32LEKind && Machine == EM_X86_64);
-
   // ELF defines two different ways to store relocation addends as shown below:
   //
   //  Rel:  Addends are stored to the location where relocations are applied.
@@ -990,9 +986,9 @@ static void setConfigs(opt::InputArgList
   // You cannot choose which one, Rel or Rela, you want to use. Instead each
   // ABI defines which one you need to use. The following expression expresses
   // that.
-  Config->IsRela =
-      (Config->Is64 || IsX32 || Machine == EM_PPC || Machine == EM_RISCV) &&
-      Machine != EM_MIPS;
+  Config->IsRela = Machine == EM_AARCH64 || Machine == EM_AMDGPU ||
+                   Machine == EM_PPC || Machine == EM_PPC64 ||
+                   Machine == EM_RISCV || Machine == EM_X86_64;
 
   // If the output uses REL relocations we must store the dynamic relocation
   // addends to the output sections. We also store addends for RELA relocations




More information about the llvm-commits mailing list