Skip to content

Commit f64f4f5

Browse files
committed
MCELFObjectTargetWriter::needsRelocateWithSymbol: Replace MCSymbol uses with MCValue
Prepare for removing the MCSymbol argument
1 parent 953302e commit f64f4f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ unsigned PPCELFObjectWriter::getRelocType(const MCFixup &Fixup,
486486
return Type;
487487
}
488488

489-
bool PPCELFObjectWriter::needsRelocateWithSymbol(const MCValue &,
490-
const MCSymbol &Sym,
489+
bool PPCELFObjectWriter::needsRelocateWithSymbol(const MCValue &V,
490+
const MCSymbol &,
491491
unsigned Type) const {
492492
switch (Type) {
493493
default:
@@ -500,7 +500,7 @@ bool PPCELFObjectWriter::needsRelocateWithSymbol(const MCValue &,
500500
// The "other" values are stored in the last 6 bits of the second byte.
501501
// The traditional defines for STO values assume the full byte and thus
502502
// the shift to pack it.
503-
unsigned Other = cast<MCSymbolELF>(Sym).getOther() << 2;
503+
unsigned Other = cast<MCSymbolELF>(*V.getAddSym()).getOther() << 2;
504504
return (Other & ELF::STO_PPC64_LOCAL_MASK) != 0;
505505
}
506506

0 commit comments

Comments
 (0)