CodeGen: Avoid implicit conversion in MachineInstrBuilder, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 27 Feb 2016 07:00:35 +0000 (07:00 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 27 Feb 2016 07:00:35 +0000 (07:00 +0000)
Avoid another implicit conversion from MachineInstrBundleIterator to
MachineInstr*, this time in MachineInstrBuilder.h (this is in pursuit of
PR26753).

llvm-svn: 262118

llvm/include/llvm/CodeGen/MachineInstrBuilder.h

index c8afa37..641791a 100644 (file)
@@ -438,9 +438,9 @@ public:
     assert(B != E && "No instructions to bundle");
     ++B;
     while (B != E) {
-      MachineInstr *MI = B;
+      MachineInstr &MI = *B;
       ++B;
-      MI->bundleWithPred();
+      MI.bundleWithPred();
     }
   }