[PATCH] D16495: [CUDA] Use Triple::isNVPTX() instead of enumerating nvptx && nvptx64.
Eric Christopher via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 23 01:04:02 PST 2016
Probably qualifies as obvious. Also can you add some text to the assert
while you're there?
On Fri, Jan 22, 2016, 5:07 PM Justin Lebar <jlebar at google.com> wrote:
> jlebar created this revision.
> jlebar added a reviewer: tra.
> jlebar added subscribers: cfe-commits, jhen, echristo.
>
> No functional changes.
>
> http://reviews.llvm.org/D16495
>
> Files:
> lib/Driver/Tools.cpp
>
> Index: lib/Driver/Tools.cpp
> ===================================================================
> --- lib/Driver/Tools.cpp
> +++ lib/Driver/Tools.cpp
> @@ -10651,8 +10651,7 @@
> const char *LinkingOutput) const {
> const auto &TC =
> static_cast<const toolchains::CudaToolChain &>(getToolChain());
> - assert(TC.getArch() == llvm::Triple::nvptx ||
> - TC.getArch() == llvm::Triple::nvptx64);
> + assert(TC.getTriple().isNVPTX());
>
> std::vector<std::string> gpu_archs =
> Args.getAllArgValues(options::OPT_march_EQ);
> @@ -10720,8 +10719,7 @@
> const char *LinkingOutput) const {
> const auto &TC =
> static_cast<const toolchains::CudaToolChain &>(getToolChain());
> - assert(TC.getArch() == llvm::Triple::nvptx ||
> - TC.getArch() == llvm::Triple::nvptx64);
> + assert(TC.getTriple().isNVPTX());
>
> ArgStringList CmdArgs;
> CmdArgs.push_back("--cuda");
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160123/834a4b6d/attachment.html>
More information about the cfe-commits
mailing list