From 7d66664724629de8d7dd3443229aa726c6dbbb0d Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 23 May 2021 15:20:56 -0700 Subject: [PATCH] [AArch64] Delete unneeded fixup_aarch64_ldr_pcrel_imm19 VK_GOT special case An AArch64 VK_GOT fixup must have a symbol. MCAssembler::evaluateFixup considers such a fixup not resolved. The code path cannot trigger. --- lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp b/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp index 02570e864e4..290fe88a8ce 100644 --- a/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp +++ b/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp @@ -491,13 +491,6 @@ bool AArch64AsmBackend::shouldForceRelocation(const MCAssembler &Asm, if (Kind == AArch64::fixup_aarch64_pcrel_adrp_imm21) return true; - AArch64MCExpr::VariantKind RefKind = - static_cast(Target.getRefKind()); - AArch64MCExpr::VariantKind SymLoc = AArch64MCExpr::getSymbolLoc(RefKind); - // LDR GOT relocations need a relocation - if (Kind == AArch64::fixup_aarch64_ldr_pcrel_imm19 && - SymLoc == AArch64MCExpr::VK_GOT) - return true; return false; }