Skip to content

Commit d9b3209

Browse files
committed
[X86] applyFixup: Remove unneeded Target.isAbsolute() and isResolved
Target and isResolved are only used by ARM.
1 parent db603a0 commit d9b3209

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -690,8 +690,7 @@ static unsigned getFixupKindSize(unsigned Kind) {
690690
}
691691

692692
void X86AsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
693-
const MCValue &Target,
694-
MutableArrayRef<char> Data,
693+
const MCValue &, MutableArrayRef<char> Data,
695694
uint64_t Value, bool IsResolved,
696695
const MCSubtargetInfo *STI) const {
697696
unsigned Kind = Fixup.getKind();
@@ -702,9 +701,8 @@ void X86AsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
702701
assert(Fixup.getOffset() + Size <= Data.size() && "Invalid fixup offset!");
703702

704703
int64_t SignedValue = static_cast<int64_t>(Value);
705-
if ((Target.isAbsolute() || IsResolved) &&
706-
getFixupKindInfo(Fixup.getKind()).Flags &
707-
MCFixupKindInfo::FKF_IsPCRel) {
704+
if (IsResolved &&
705+
getFixupKindInfo(Fixup.getKind()).Flags & MCFixupKindInfo::FKF_IsPCRel) {
708706
// check that PC relative fixup fits into the fixup size.
709707
if (Size > 0 && !isIntN(Size * 8, SignedValue))
710708
Asm.getContext().reportError(

0 commit comments

Comments
 (0)