[lld] r338718 - [LLD][ELF] - Remove excessive cases from getRelocTargetVA(). NFC.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 2 07:15:02 PDT 2018


Author: grimar
Date: Thu Aug  2 07:15:02 2018
New Revision: 338718

URL: http://llvm.org/viewvc/llvm-project?rev=338718&view=rev
Log:
[LLD][ELF] - Remove excessive cases from getRelocTargetVA(). NFC.

There is no point to explicitly proccess the expressions this patch removes.
We already have a llvm_unreachable for the default case.

Modified:
    lld/trunk/ELF/InputSection.cpp

Modified: lld/trunk/ELF/InputSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=338718&r1=338717&r2=338718&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Thu Aug  2 07:15:02 2018
@@ -518,11 +518,6 @@ static uint64_t getRelocTargetVA(const I
   case R_GOT_PC:
   case R_RELAX_TLS_GD_TO_IE:
     return Sym.getGotVA() + A - P;
-  case R_HINT:
-  case R_NONE:
-  case R_TLSDESC_CALL:
-  case R_TLSLD_HINT:
-    llvm_unreachable("cannot relocate hint relocs");
   case R_MIPS_GOTREL:
     return Sym.getVA(A) - InX::MipsGot->getGp(File);
   case R_MIPS_GOT_GP:




More information about the llvm-commits mailing list