Skip to content

Commit 4fdcde5

Browse files
committed
[X86] Define shouldForceRelocation
Somehow needed by LTO/X86/cfi_jt_aliases.ll Fixes: 6f6dc1f
1 parent 04211ba commit 4fdcde5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ class X86AsmBackend : public MCAsmBackend {
169169

170170
MCFixupKindInfo getFixupKindInfo(MCFixupKind Kind) const override;
171171

172+
bool shouldForceRelocation(const MCAssembler &, const MCFixup &,
173+
const MCValue &, const MCSubtargetInfo *) override;
174+
172175
void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
173176
const MCValue &Target, MutableArrayRef<char> Data,
174177
uint64_t Value, bool IsResolved,
@@ -687,6 +690,12 @@ static unsigned getFixupKindSize(unsigned Kind) {
687690
}
688691
}
689692

693+
bool X86AsmBackend::shouldForceRelocation(const MCAssembler &, const MCFixup &,
694+
const MCValue &Target,
695+
const MCSubtargetInfo *) {
696+
return Target.getSpecifier();
697+
}
698+
690699
void X86AsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
691700
const MCValue &, MutableArrayRef<char> Data,
692701
uint64_t Value, bool IsResolved,

0 commit comments

Comments
 (0)