summaryrefslogtreecommitdiff
path: root/lib/Target/R600/AMDGPUMCInstLower.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-05 22:42:04 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-05 22:42:04 +0000
commitb29a2b0c4c69971a179652cb262e970fde5fc9ed (patch)
tree1324ebc5419058817bd3547cdb4efeaca2afcb3d /lib/Target/R600/AMDGPUMCInstLower.cpp
parent553e40036af29f9e8dee46812cd2ad90d97225f0 (diff)
downloadllvm-b29a2b0c4c69971a179652cb262e970fde5fc9ed.tar.gz
llvm-b29a2b0c4c69971a179652cb262e970fde5fc9ed.tar.bz2
llvm-b29a2b0c4c69971a179652cb262e970fde5fc9ed.tar.xz
MachineInstr: introduce explicit_operands and implicit_operands ranges
Makes iteration over implicit and explicit machine operands more explicit (har har). Insipired by code review discussion for r205565. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/R600/AMDGPUMCInstLower.cpp')
-rw-r--r--lib/Target/R600/AMDGPUMCInstLower.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Target/R600/AMDGPUMCInstLower.cpp b/lib/Target/R600/AMDGPUMCInstLower.cpp
index 2c9909ff9d..d65b00f018 100644
--- a/lib/Target/R600/AMDGPUMCInstLower.cpp
+++ b/lib/Target/R600/AMDGPUMCInstLower.cpp
@@ -38,9 +38,7 @@ AMDGPUMCInstLower::AMDGPUMCInstLower(MCContext &ctx):
void AMDGPUMCInstLower::lower(const MachineInstr *MI, MCInst &OutMI) const {
OutMI.setOpcode(MI->getOpcode());
- for (unsigned i = 0, e = MI->getNumExplicitOperands(); i != e; ++i) {
- const MachineOperand &MO = MI->getOperand(i);
-
+ for (const MachineOperand &MO : MI->explicit_operands()) {
MCOperand MCOp;
switch (MO.getType()) {
default: