From a236a233718aebfa9100eab728090494cb02dba7 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 14 Jan 2025 15:55:52 -0800 Subject: [PATCH] [RISCV][llvm-exegesis] Simplfy copying a SmallVector to a std::vector. NFC --- llvm/tools/llvm-exegesis/lib/RISCV/Target.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/llvm/tools/llvm-exegesis/lib/RISCV/Target.cpp b/llvm/tools/llvm-exegesis/lib/RISCV/Target.cpp index 5636782bdf7f6..d55db9af8a9bd 100644 --- a/llvm/tools/llvm-exegesis/lib/RISCV/Target.cpp +++ b/llvm/tools/llvm-exegesis/lib/RISCV/Target.cpp @@ -32,13 +32,11 @@ namespace { static std::vector loadIntReg(const MCSubtargetInfo &STI, unsigned Reg, const APInt &Value) { SmallVector MCInstSeq; - std::vector MatIntInstrs; MCRegister DestReg = Reg; RISCVMatInt::generateMCInstSeq(Value.getSExtValue(), STI, DestReg, MCInstSeq); - MatIntInstrs.resize(MCInstSeq.size()); - std::copy(MCInstSeq.begin(), MCInstSeq.end(), MatIntInstrs.begin()); + std::vector MatIntInstrs(MCInstSeq.begin(), MCInstSeq.end()); return MatIntInstrs; }