aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp5
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);
}