Skip to content

Commit f1aee59

Browse files
committed
ARM: Remove unneeded ARM::fixup_arm_thumb_bl special case
This is a weird special case added in 2015, simplifying an even older condition. It is a no-op for ELF (isExternal is always false) and seems unneeded for non-ELF.
1 parent 2a59400 commit f1aee59

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -937,17 +937,6 @@ bool ARMAsmBackend::shouldForceRelocation(const MCFixup &Fixup,
937937
const MCValue &Target) {
938938
const MCSymbol *Sym = Target.getAddSym();
939939
const unsigned FixupKind = Fixup.getKind();
940-
if (FixupKind == ARM::fixup_arm_thumb_bl) {
941-
assert(Sym && "How did we resolve this?");
942-
943-
// If the symbol is external the linker will handle it.
944-
// FIXME: Should we handle it as an optimization?
945-
946-
// If the symbol is out of range, produce a relocation and hope the
947-
// linker can handle it. GNU AS produces an error in this case.
948-
if (Sym->isExternal())
949-
return true;
950-
}
951940
// Create relocations for unconditional branches to function symbols with
952941
// different execution mode in ELF binaries.
953942
if (needsInterworking(*Asm, Sym, Fixup.getKind()))

0 commit comments

Comments
 (0)