[llvm] r262118 - CodeGen: Avoid implicit conversion in MachineInstrBuilder, NFC

Duncan P. N. Exon Smith via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 26 23:00:35 PST 2016


Author: dexonsmith
Date: Sat Feb 27 01:00:35 2016
New Revision: 262118

URL: http://llvm.org/viewvc/llvm-project?rev=262118&view=rev
Log:
CodeGen: Avoid implicit conversion in MachineInstrBuilder, NFC

Avoid another implicit conversion from MachineInstrBundleIterator to
MachineInstr*, this time in MachineInstrBuilder.h (this is in pursuit of
PR26753).

Modified:
    llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h

Modified: llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h?rev=262118&r1=262117&r2=262118&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h Sat Feb 27 01:00:35 2016
@@ -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();
     }
   }
 




More information about the llvm-commits mailing list