sfantao added a comment.

Hi Art,
Thanks for the review! Addressed your comments in the last diff.

Thanks again,
Samuel


================
Comment at: lib/Driver/Action.cpp:191-202
@@ +190,14 @@
+    const OffloadActionWorkTy &Work) const {
+  auto I = getInputs().begin();
+  auto E = getInputs().end();
+  if (I == E)
+    return;
+
+  // Skip host action
+  if (HostTC)
+    ++I;
+
+  auto TI = DevToolChains.begin();
+  for (; I != E; ++I, ++TI)
+    Work(*I, *TI, (*I)->getOffloadingArch());
+}
----------------
tra wrote:
> You may want to add an assert that I and TI are both valid within the loop.
I added an assertion for `TI`. I didn't do that for `I` though, as it is the 
exit condition of the loop, so it will be always valid. Let me know if you 
still want me to add that.


http://reviews.llvm.org/D18171



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to