[llvm] 4fdcde5 - [X86] Define shouldForceRelocation
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed May 21 23:52:59 PDT 2025
Author: Fangrui Song
Date: 2025-05-21T23:52:54-07:00
New Revision: 4fdcde56a521e7031981190165ff8ba0fb368e8c
URL: https://github.com/llvm/llvm-project/commit/4fdcde56a521e7031981190165ff8ba0fb368e8c
DIFF: https://github.com/llvm/llvm-project/commit/4fdcde56a521e7031981190165ff8ba0fb368e8c.diff
LOG: [X86] Define shouldForceRelocation
Somehow needed by LTO/X86/cfi_jt_aliases.ll
Fixes: 6f6dc1f239433393c0b09430193beb85d03464c8
Added:
Modified:
llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
index 3cee53a886ebf..c08ceaa29763b 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
@@ -169,6 +169,9 @@ class X86AsmBackend : public MCAsmBackend {
MCFixupKindInfo getFixupKindInfo(MCFixupKind Kind) const override;
+ bool shouldForceRelocation(const MCAssembler &, const MCFixup &,
+ const MCValue &, const MCSubtargetInfo *) override;
+
void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
const MCValue &Target, MutableArrayRef<char> Data,
uint64_t Value, bool IsResolved,
@@ -687,6 +690,12 @@ static unsigned getFixupKindSize(unsigned Kind) {
}
}
+bool X86AsmBackend::shouldForceRelocation(const MCAssembler &, const MCFixup &,
+ const MCValue &Target,
+ const MCSubtargetInfo *) {
+ return Target.getSpecifier();
+}
+
void X86AsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
const MCValue &, MutableArrayRef<char> Data,
uint64_t Value, bool IsResolved,
More information about the llvm-commits
mailing list