diff options
author | Fangrui Song <i@maskray.me> | 2025-05-24 12:02:17 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2025-05-24 12:02:18 -0700 |
commit | 7d71a356582c3cdffdfc01be29e171b87e44badb (patch) | |
tree | 5d61f58005dd62cefaa44521a6859a2e5bdf126d /llvm/lib/MC/MCObjectStreamer.cpp | |
parent | dcef154b5caf6556e69bb18bbb0506d274aa474e (diff) | |
download | llvm-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/MCObjectStreamer.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectStreamer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/MC/MCObjectStreamer.cpp b/llvm/lib/MC/MCObjectStreamer.cpp index 7036c40..816c60b 100644 --- a/llvm/lib/MC/MCObjectStreamer.cpp +++ b/llvm/lib/MC/MCObjectStreamer.cpp @@ -201,9 +201,8 @@ void MCObjectStreamer::emitValueImpl(const MCExpr *Value, unsigned Size, emitIntValue(AbsValue, Size); return; } - DF->getFixups().push_back( - MCFixup::create(DF->getContents().size(), Value, - MCFixup::getKindForSize(Size, false), Loc)); + DF->getFixups().push_back(MCFixup::create( + DF->getContents().size(), Value, MCFixup::getDataKindForSize(Size), Loc)); DF->appendContents(Size, 0); } |