Skip to content

Commit ab4638c

Browse files
committed
RISCVAsmBackend: Simplify relaxDwarfCFA
Make it similar to addReloc
1 parent f871466 commit ab4638c

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -328,14 +328,8 @@ bool RISCVAsmBackend::relaxDwarfCFA(MCDwarfCallFrameFragment &DF,
328328
auto AddFixups = [&Fixups, &AddrDelta](unsigned Offset,
329329
std::pair<unsigned, unsigned> Fixup) {
330330
const MCBinaryExpr &MBE = cast<MCBinaryExpr>(AddrDelta);
331-
Fixups.push_back(
332-
MCFixup::create(Offset, MBE.getLHS(),
333-
static_cast<MCFixupKind>(FirstLiteralRelocationKind +
334-
std::get<0>(Fixup))));
335-
Fixups.push_back(
336-
MCFixup::create(Offset, MBE.getRHS(),
337-
static_cast<MCFixupKind>(FirstLiteralRelocationKind +
338-
std::get<1>(Fixup))));
331+
Fixups.push_back(MCFixup::create(Offset, MBE.getLHS(), std::get<0>(Fixup)));
332+
Fixups.push_back(MCFixup::create(Offset, MBE.getRHS(), std::get<1>(Fixup)));
339333
};
340334

341335
if (isUIntN(6, Value)) {

0 commit comments

Comments
 (0)