diff options
author | Kazu Hirata <kazu@google.com> | 2025-04-18 10:26:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-18 10:26:48 -0700 |
commit | 58774f1b1f98402c8d62cdde01c1adea067aaf96 (patch) | |
tree | 968960fd4367abd3beaf1951ab209cbd44b3d701 /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | 5ad32fa6973638a091891942939933a41cbb2162 (diff) | |
download | llvm-58774f1b1f98402c8d62cdde01c1adea067aaf96.zip llvm-58774f1b1f98402c8d62cdde01c1adea067aaf96.tar.gz llvm-58774f1b1f98402c8d62cdde01c1adea067aaf96.tar.bz2 |
[CodeGen] Construct SmallVector with iterator ranges (NFC) (#136258)
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 7e4a32f..33910d0 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -2442,9 +2442,8 @@ static const DIExpression *computeExprForSpill( static const DIExpression *computeExprForSpill(const MachineInstr &MI, Register SpillReg) { assert(MI.hasDebugOperandForReg(SpillReg) && "Spill Reg is not used in MI."); - SmallVector<const MachineOperand *> SpillOperands; - for (const MachineOperand &Op : MI.getDebugOperandsForReg(SpillReg)) - SpillOperands.push_back(&Op); + SmallVector<const MachineOperand *> SpillOperands( + llvm::make_pointer_range(MI.getDebugOperandsForReg(SpillReg))); return computeExprForSpill(MI, SpillOperands); } |