tra added inline comments.

================
Comment at: lib/Driver/ToolChains.cpp:4834
@@ -4831,2 +4833,3 @@
+    getDriver().Diag(diag::err_drv_cuda_nvptx_host);
   }
   return DAL;
----------------
jlebar wrote:
> IRL we talked about putting an assert() here and bailing out earlier.  Does 
> that not work?
> 
> My hope was that we could avoid having to put checks everywhere that the 
> -arch flag is non-empty.
> 
> Also, if we're going to print an error message saying "you can't use nvptx as 
> the host compiler", it would be nice to do that at some point in the code 
> where we have confidence that someone is actually trying to use nvptx as the 
> host compiler, instead of assuming that, if we get here, that's what happened.
Haven't found a good place for it yet.
Another problem is that Driver::Diag() does not abort the program and we'll 
continue on and will execute these functions and will trigger asserts if they 
are there. I'll try changing diagnostics from Error to Fatal. If that stops 
clang right there, then we can keep asserts in place.


https://reviews.llvm.org/D23042



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

Reply via email to