Skip to content

Commit 15ca5a8

Browse files
committed
[MC] Remove MCAsmLayout::getFragmentAddress
1 parent 1c0e722 commit 15ca5a8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ static uint64_t adjustFixupValue(const MCFixup &Fixup, uint64_t Value,
520520
}
521521

522522
bool RISCVAsmBackend::evaluateTargetFixup(
523-
const MCAssembler &Asm, const MCAsmLayout &Layout, const MCFixup &Fixup,
523+
const MCAssembler &Asm, const MCFixup &Fixup,
524524
const MCFragment *DF, const MCValue &Target, const MCSubtargetInfo *STI,
525525
uint64_t &Value, bool &WasForced) {
526526
const MCFixup *AUIPCFixup;
@@ -570,7 +570,7 @@ bool RISCVAsmBackend::evaluateTargetFixup(
570570
if (!IsResolved)
571571
return false;
572572

573-
Value = Layout.getSymbolOffset(SA) + AUIPCTarget.getConstant();
573+
Value = Asm.getSymbolOffset(SA) + AUIPCTarget.getConstant();
574574
Value -= Asm.getFragmentOffset(*AUIPCDF) + AUIPCFixup->getOffset();
575575

576576
if (shouldForceRelocation(Asm, *AUIPCFixup, AUIPCTarget, STI)) {

llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class RISCVAsmBackend : public MCAsmBackend {
4747
bool shouldInsertFixupForCodeAlign(MCAssembler &Asm,
4848
MCAlignFragment &AF) override;
4949

50-
bool evaluateTargetFixup(const MCAssembler &Asm, const MCAsmLayout &Layout,
50+
bool evaluateTargetFixup(const MCAssembler &Asm,
5151
const MCFixup &Fixup, const MCFragment *DF,
5252
const MCValue &Target, const MCSubtargetInfo *STI,
5353
uint64_t &Value, bool &WasForced) override;

0 commit comments

Comments
 (0)