Skip to content

Commit 02af13a

Browse files
committed
[RISCV] Simplify evaluateAsRelocatableImpl. NFC
RISCVMCExpr is not created with VK_None.
1 parent f7228f3 commit 02af13a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ bool RISCVMCExpr::evaluateAsRelocatableImpl(MCValue &Res,
9494
Res.setSpecifier(specifier);
9595

9696
// Custom fixup types are not valid with symbol difference expressions.
97-
return Res.getSymB() ? getSpecifier() == VK_None : true;
97+
return !Res.getSubSym();
9898
}
9999

100100
void RISCVMCExpr::visitUsedExpr(MCStreamer &Streamer) const {

0 commit comments

Comments
 (0)