]> granicus.if.org Git - llvm/commitdiff
AsmPrinter: Avoid implicit iterator conversions in DbgValueHistoryCalculator, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 8 Jul 2016 19:31:47 +0000 (19:31 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 8 Jul 2016 19:31:47 +0000 (19:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274911 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp

index 21d816bc9973c4f1dcd6b408c262964d601d1a96..adc536f1add8afbc98c90779b883dd77d914ed92 100644 (file)
@@ -138,12 +138,12 @@ static const MachineInstr *getFirstEpilogueInst(const MachineBasicBlock &MBB) {
        E = MBB.rend();
        I != E; ++I) {
     if (I->getDebugLoc() != LastLoc)
-      return Res;
+      return &*Res;
     Res = &*I;
   }
   // If all instructions have the same debug location, assume whole MBB is
   // an epilogue.
-  return MBB.begin();
+  return &*MBB.begin();
 }
 
 // \brief Collect registers that are modified in the function body (their