Skip to content

Commit 70f5632

Browse files
committed
[PowerPC,MC] Replace getSymA()->getSymbol() with getAddSym. NFC
We will replace the MCSymbolRefExpr member in MCValue with MCSymbol. This change reduces dependence on MCSymbolRefExpr.
1 parent 7cf8a62 commit 70f5632

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,18 @@ class PPCAsmBackend : public MCAsmBackend {
169169
// If the target symbol has a local entry point we must not attempt
170170
// to resolve the fixup directly. Emit a relocation and leave
171171
// resolution of the final target address to the linker.
172-
if (const MCSymbolRefExpr *A = Target.getSymA()) {
173-
if (const auto *S = dyn_cast<MCSymbolELF>(&A->getSymbol())) {
172+
if (const auto *A = Target.getAddSym()) {
173+
if (const auto *S = dyn_cast<MCSymbolELF>(A)) {
174174
// The "other" values are stored in the last 6 bits of the second
175175
// byte. The traditional defines for STO values assume the full byte
176176
// and thus the shift to pack it.
177177
unsigned Other = S->getOther() << 2;
178178
if ((Other & ELF::STO_PPC64_LOCAL_MASK) != 0)
179179
return true;
180-
} else if (const auto *S = dyn_cast<MCSymbolXCOFF>(&A->getSymbol())) {
180+
} else if (const auto *S = dyn_cast<MCSymbolXCOFF>(A)) {
181181
return !Target.isAbsolute() && S->isExternal() &&
182182
S->getStorageClass() == XCOFF::C_WEAKEXT;
183-
}
183+
}
184184
}
185185
return false;
186186
}

0 commit comments

Comments
 (0)