[llvm] d9b3209 - [X86] applyFixup: Remove unneeded Target.isAbsolute() and isResolved
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 29 19:29:04 PDT 2025
Author: Fangrui Song
Date: 2025-03-29T19:28:59-07:00
New Revision: d9b3209e8640e69d328b7ead169c5304a80dd1be
URL: https://github.com/llvm/llvm-project/commit/d9b3209e8640e69d328b7ead169c5304a80dd1be
DIFF: https://github.com/llvm/llvm-project/commit/d9b3209e8640e69d328b7ead169c5304a80dd1be.diff
LOG: [X86] applyFixup: Remove unneeded Target.isAbsolute() and isResolved
Target and isResolved are only used by ARM.
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 3653f5ae03b14..d698c917d4382 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
@@ -690,8 +690,7 @@ static unsigned getFixupKindSize(unsigned Kind) {
}
void X86AsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
- const MCValue &Target,
- MutableArrayRef<char> Data,
+ const MCValue &, MutableArrayRef<char> Data,
uint64_t Value, bool IsResolved,
const MCSubtargetInfo *STI) const {
unsigned Kind = Fixup.getKind();
@@ -702,9 +701,8 @@ void X86AsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
assert(Fixup.getOffset() + Size <= Data.size() && "Invalid fixup offset!");
int64_t SignedValue = static_cast<int64_t>(Value);
- if ((Target.isAbsolute() || IsResolved) &&
- getFixupKindInfo(Fixup.getKind()).Flags &
- MCFixupKindInfo::FKF_IsPCRel) {
+ if (IsResolved &&
+ getFixupKindInfo(Fixup.getKind()).Flags & MCFixupKindInfo::FKF_IsPCRel) {
// check that PC relative fixup fits into the fixup size.
if (Size > 0 && !isIntN(Size * 8, SignedValue))
Asm.getContext().reportError(
More information about the llvm-commits
mailing list