aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCExpr.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2025-04-05 13:23:13 -0700
committerFangrui Song <i@maskray.me>2025-04-05 13:23:14 -0700
commit086af836889436baffc71c743c7c8259bad8ed60 (patch)
tree5fc313d1f4170338621b0e0c07c83ea8a8d11929 /llvm/lib/MC/MCExpr.cpp
parent7ccdc3d5ca648c09bbeb86f5063f7b0ee3e9b5e2 (diff)
downloadllvm-086af836889436baffc71c743c7c8259bad8ed60.zip
llvm-086af836889436baffc71c743c7c8259bad8ed60.tar.gz
llvm-086af836889436baffc71c743c7c8259bad8ed60.tar.bz2
[MC] Replace getSymA()->getSymbol() with getAddSym. NFC
We will replace the MCSymbolRefExpr member in MCValue with MCSymbol. This change reduces dependence on MCSymbolRefExpr.
Diffstat (limited to 'llvm/lib/MC/MCExpr.cpp')
-rw-r--r--llvm/lib/MC/MCExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp
index 1a7c459..b921b55 100644
--- a/llvm/lib/MC/MCExpr.cpp
+++ b/llvm/lib/MC/MCExpr.cpp
@@ -578,7 +578,7 @@ bool MCExpr::evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm,
break;
case MCUnaryExpr::Minus:
/// -(a - b + const) ==> (b - a - const)
- if (Value.getSymA() && !Value.getSubSym())
+ if (Value.getAddSym() && !Value.getSubSym())
return false;
// The cast avoids undefined behavior if the constant is INT64_MIN.