<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
================<br>
Comment at: lib/Transforms/Utils/MemorySSA.cpp:357<br>
@@ +356,3 @@<br>
+  unsigned ID = 0;<br>
+  for (auto I = F.begin(), E = F.end(); I != E; ++I)<br>
+    BBNumbers[I] = ID++;<br>
----------------<br>
Range-based for?<br></blockquote><div><br>BTW, at least the obvious construction of that  for( auto I : F) gives:</div><div><div>../lib/Transforms/Utils/MemorySSA.cpp:350:13: error: call to deleted constructor of 'llvm::BasicBlock'</div><div>  for (auto I : F)</div><div>            ^ ~</div></div><div><div><br></div><div>../include/llvm/IR/BasicBlock.h:85:3: note: 'BasicBlock' has been explicitly marked deleted here</div><div>  BasicBlock(const BasicBlock &) = delete;</div><div>  ^</div></div><div><br></div><div>Is there some way to iterate over basic block instructions using range based for that we've added? </div></div></div></div>