tra added inline comments.

================
Comment at: lib/Driver/Driver.cpp:1026-1028
@@ -1024,4 +1025,5 @@
   } else if (CudaDeviceAction *CDA = dyn_cast<CudaDeviceAction>(A)) {
-    os << '"'
-       << (CDA->getGpuArchName() ? CDA->getGpuArchName() : "(multiple archs)")
+    os << '"' << (CDA->getGpuArch() != CudaArch::UNKNOWN
+                      ? CudaArchToString(CDA->getGpuArch())
+                      : "(multiple archs)")
        << '"' << ", {" << PrintActions1(C, *CDA->input_begin(), Ids) << "}";
----------------
jlebar wrote:
> tra wrote:
> > I think this could be collapsed to just CudaArchToString(CDA->getGpuArch()).
> > "(multiple archs)" is as informative as (and indistinguishable from) 
> > "unknown" here.
> > 
> > 
> I'm not crazy about "unknown", since it *is* actually known.  How about we 
> just not output anything?
It's a debugging output so it would be good to accurately reflect our internal 
state.
In this case if we for some reason end up with CudaArch::UNKNOWN, I'd want to 
know that. 
If we really use UNKNOWN to represent multiple archs, perhaps it needs an enum 
for multiple-archs.


http://reviews.llvm.org/D21867



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

Reply via email to