[PATCH] D18171: [CUDA][OpenMP] Create generic offload action

Samuel Antao via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 13 15:05:08 PDT 2016


sfantao added inline comments.

================
Comment at: lib/Driver/Action.cpp:191-202
@@ +190,14 @@
+  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) {
+    assert(TI != DevToolChains.end() && "More dependences than tool chains??");
+    Work(*I, *TI, (*I)->getOffloadingArch());
+  }
----------------
The only change in this function was the assertion inside the loop. Its possible my message got in before the actual diff, sorry about that...

Ok, got it. I'm replacing the assertion in the loop body by an assertion that checks if the sizes of the inputs  and toolchains are consistent. Let me know if you'd rather have a check of the iterator inside and after the loop.


http://reviews.llvm.org/D18171





More information about the cfe-commits mailing list