diff options
author | Fangrui Song <i@maskray.me> | 2025-05-23 20:21:15 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-23 20:21:15 -0700 |
commit | ccffa1d3fe120f4bae66c99ab40ab4024a4df68f (patch) | |
tree | d480a92cde049d1f05177ca4fcb0554de251126c /llvm/lib/MC/MCAsmBackend.cpp | |
parent | dddcbc26d6bcbc3361f7c56e8168ddd76d0dfc0f (diff) | |
download | llvm-ccffa1d3fe120f4bae66c99ab40ab4024a4df68f.zip llvm-ccffa1d3fe120f4bae66c99ab40ab4024a4df68f.tar.gz llvm-ccffa1d3fe120f4bae66c99ab40ab4024a4df68f.tar.bz2 |
[MC] Don't pass MCSubtargetInfo down to shouldForceRelocation and evaluateTargetFixup (#141311)
This reverts the code change in commit
e87f33d9ce785668223c3bcc4e06956985cccda1 (#73721) but keeps its test.
There have been many changes to lib/MC and AsmBackend.cpp files, so this
is not a pure revert.
#73721, a workaround to generate necessary relocations in mixed
non-relax/relax code,
is no longer necessary after #140692 fixed the root issue (whether two
locations are separated by a fragment with indeterminate size due to
linker relaxation).
Diffstat (limited to 'llvm/lib/MC/MCAsmBackend.cpp')
-rw-r--r-- | llvm/lib/MC/MCAsmBackend.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCAsmBackend.cpp b/llvm/lib/MC/MCAsmBackend.cpp index 2dae9c0..622838f 100644 --- a/llvm/lib/MC/MCAsmBackend.cpp +++ b/llvm/lib/MC/MCAsmBackend.cpp @@ -122,7 +122,7 @@ bool MCAsmBackend::addReloc(MCAssembler &Asm, const MCFragment &F, const MCFixup &Fixup, const MCValue &Target, uint64_t &FixedValue, bool IsResolved, const MCSubtargetInfo *STI) { - if (IsResolved && shouldForceRelocation(Asm, Fixup, Target, STI)) + if (IsResolved && shouldForceRelocation(Asm, Fixup, Target)) IsResolved = false; if (!IsResolved) Asm.getWriter().recordRelocation(Asm, &F, Fixup, Target, FixedValue); |