[PATCH] D123675: [RISCV][NFC] Use addExpr() instead of createExpr()
Wang Pengcheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 13 05:50:21 PDT 2022
pcwang-thead created this revision.
pcwang-thead added reviewers: asb, craig.topper, luismarques.
Herald added subscribers: sunshaoce, VincentWu, luke957, StephenFan, vkmr, frasercrmck, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, arichardson.
Herald added a project: All.
pcwang-thead requested review of this revision.
Herald added subscribers: llvm-commits, eopXD, MaskRay.
Herald added a project: LLVM.
It seems to be neater.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D123675
Files:
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
Index: llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
===================================================================
--- llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
+++ llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
@@ -132,9 +132,7 @@
const MCExpr *CallExpr = Func.getExpr();
// Emit AUIPC Ra, Func with R_RISCV_CALL relocation type.
- TmpInst = MCInstBuilder(RISCV::AUIPC)
- .addReg(Ra)
- .addOperand(MCOperand::createExpr(CallExpr));
+ TmpInst = MCInstBuilder(RISCV::AUIPC).addReg(Ra).addExpr(CallExpr);
Binary = getBinaryCodeForInstr(TmpInst, Fixups, STI);
support::endian::write(OS, Binary, support::little);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123675.422493.patch
Type: text/x-patch
Size: 703 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220413/4820686e/attachment.bin>
More information about the llvm-commits
mailing list