Skip to content

Commit f336c90

Browse files
committed
LoongArch: Use mc::isRelocation. NFC
1 parent 6311b11 commit f336c90

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ LoongArchAsmBackend::getFixupKindInfo(MCFixupKind Kind) const {
7070

7171
// Fixup kinds from .reloc directive are like R_LARCH_NONE. They
7272
// do not require any extra processing.
73-
if (unsigned(Kind) >= FirstRelocationKind)
73+
if (mc::isRelocation(Kind))
7474
return MCAsmBackend::getFixupKindInfo(FK_NONE);
7575

7676
if (Kind < FirstTargetFixupKind)
@@ -152,10 +152,10 @@ void LoongArchAsmBackend::applyFixup(const MCAssembler &Asm,
152152
if (!Value)
153153
return; // Doesn't change encoding.
154154

155-
auto Kind = Fixup.getTargetKind();
156-
if (Kind >= FirstRelocationKind)
155+
auto Kind = Fixup.getKind();
156+
if (mc::isRelocation(Kind))
157157
return;
158-
MCFixupKindInfo Info = getFixupKindInfo(MCFixupKind(Kind));
158+
MCFixupKindInfo Info = getFixupKindInfo(Kind);
159159
MCContext &Ctx = Asm.getContext();
160160

161161
// Fixup leb128 separately.

0 commit comments

Comments
 (0)