[PATCH] D38734: [MachineCombiner] Fix initialisation of LastUpdate for incremental update.

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 11 04:48:18 PDT 2017


paulwalker-arm added inline comments.


================
Comment at: lib/CodeGen/MachineCombiner.cpp:417
   bool IncrementalUpdate = false;
   auto BlockIter = MBB->begin();
+  decltype(BlockIter) LastUpdate;
----------------
aemerson wrote:
> fhahn wrote:
> > just out of curiosity, would `auto auto BlockIter = MBB->begin(), LastUpdate;` work?
> At this point just use the type explicitly?
The first suggestion is not valid C++.  Given the surrounding code, decltype seems like the correct choice.  I can make the types explicit, but then why allow auto in the first place?


https://reviews.llvm.org/D38734





More information about the llvm-commits mailing list