aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MachObjectWriter.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2025-03-15 15:33:09 -0700
committerFangrui Song <i@maskray.me>2025-03-15 15:33:09 -0700
commitff2ed154a8a9ea52adb3667833fe6fddd27b0487 (patch)
treea83f5e599a29713c050cfe781605f820d6f7d78b /llvm/lib/MC/MachObjectWriter.cpp
parent5e65b40f9c0fd9fc9bc17c36dbd5ee1beec15d4f (diff)
downloadllvm-ff2ed154a8a9ea52adb3667833fe6fddd27b0487.zip
llvm-ff2ed154a8a9ea52adb3667833fe6fddd27b0487.tar.gz
llvm-ff2ed154a8a9ea52adb3667833fe6fddd27b0487.tar.bz2
[MC] evaluateAsAbsolute requires MCValue::RefKind==0
In `.equ a, 3; .if a@plt`, a@plt does not evaluate to an absolute value (MCExpr::evaluateAsRelocatableImpl disables evaluation when the Kind != 0 at parse time). Similarly, when using MCTargetValue, evaluateAsAbsolute should return false when MCValue::RefKind==0. This allows us to remove `if (!Asm)` check from MipsMCExpr.cpp (%hi(0xdeadbeef) is not evaluated to a constant without RefKind) and make targets less error-prone.
Diffstat (limited to 'llvm/lib/MC/MachObjectWriter.cpp')
0 files changed, 0 insertions, 0 deletions