aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/WasmObjectWriter.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2025-05-24 12:02:17 -0700
committerFangrui Song <i@maskray.me>2025-05-24 12:02:18 -0700
commit7d71a356582c3cdffdfc01be29e171b87e44badb (patch)
tree5d61f58005dd62cefaa44521a6859a2e5bdf126d /llvm/lib/MC/WasmObjectWriter.cpp
parentdcef154b5caf6556e69bb18bbb0506d274aa474e (diff)
downloadllvm-7d71a356582c3cdffdfc01be29e171b87e44badb.zip
llvm-7d71a356582c3cdffdfc01be29e171b87e44badb.tar.gz
llvm-7d71a356582c3cdffdfc01be29e171b87e44badb.tar.bz2
MCFixup: Remove FK_PCRel_ from getKindForSize
Remove FK_PCRel_* kinds from the generic fixup list, as they are not generic like FK_Data_*. In getRelocType, FK_PCRel_* can be replaced with FK_Data_* by leveraging the IsPCRel argument. Their inclusion in the generic kind list caused confusion for PowerPC, RISCV, and VE targets. The X86/M68k uses can be implemented as target-specific fixups.
Diffstat (limited to 'llvm/lib/MC/WasmObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/WasmObjectWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp
index 03746ae..d0e1853 100644
--- a/llvm/lib/MC/WasmObjectWriter.cpp
+++ b/llvm/lib/MC/WasmObjectWriter.cpp
@@ -1897,7 +1897,7 @@ uint64_t WasmObjectWriter::writeOneObject(MCAssembler &Asm,
assert(llvm::all_of(DataFrag.getContents(), [](char C) { return !C; }));
for (const MCFixup &Fixup : DataFrag.getFixups()) {
assert(Fixup.getKind() ==
- MCFixup::getKindForSize(is64Bit() ? 8 : 4, false));
+ MCFixup::getDataKindForSize(is64Bit() ? 8 : 4));
const MCExpr *Expr = Fixup.getValue();
auto *SymRef = dyn_cast<MCSymbolRefExpr>(Expr);
if (!SymRef)