diff options
author | wangpc <pc.wang@linux.alibaba.com> | 2022-04-14 10:47:08 +0800 |
---|---|---|
committer | wangpc <pc.wang@linux.alibaba.com> | 2022-04-14 10:48:25 +0800 |
commit | d0828c5af9cedf13e41b92a94a8e4e0417a8cd27 (patch) | |
tree | 3797171d789b4adbd96fc2b61c7c286632d25b28 | |
parent | ffd656a2fe5da8c3ad50fe353bcadeae009f0eb4 (diff) | |
download | llvm-d0828c5af9cedf13e41b92a94a8e4e0417a8cd27.zip llvm-d0828c5af9cedf13e41b92a94a8e4e0417a8cd27.tar.gz llvm-d0828c5af9cedf13e41b92a94a8e4e0417a8cd27.tar.bz2 |
[RISCV][NFC] Use addExpr() instead of createExpr()
It seems to be neater.
Reviewed By: asb
Differential Revision: https://reviews.llvm.org/D123675
-rw-r--r-- | llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp index 438e693..7c06238 100644 --- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp +++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp @@ -132,9 +132,7 @@ void RISCVMCCodeEmitter::expandFunctionCall(const MCInst &MI, raw_ostream &OS, 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); |