Skip to content

Commit a07b374

Browse files
committed
[LoongArch] Simplify evaluateAsRelocatableImpl
Similar to RISCV
1 parent b6a9618 commit a07b374

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMCExpr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ bool LoongArchMCExpr::evaluateAsRelocatableImpl(
5151

5252
Res.setSpecifier(specifier);
5353
// Custom fixup types are not valid with symbol difference expressions.
54-
return Res.getSymB() ? specifier == VK_None : true;
54+
return !Res.getSubSym();
5555
}
5656

5757
void LoongArchMCExpr::visitUsedExpr(MCStreamer &Streamer) const {

0 commit comments

Comments
 (0)