r258640 - [CUDA] Use Triple::isNVPTX() instead of enumerating nvptx && nvptx64.
Justin Lebar via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 23 13:28:08 PST 2016
Author: jlebar
Date: Sat Jan 23 15:28:08 2016
New Revision: 258640
URL: http://llvm.org/viewvc/llvm-project?rev=258640&view=rev
Log:
[CUDA] Use Triple::isNVPTX() instead of enumerating nvptx && nvptx64.
Summary: No functional changes.
Subscribers: tra, echristo, jhen, cfe-commits
Differential Revision: http://reviews.llvm.org/D16495
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=258640&r1=258639&r2=258640&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Sat Jan 23 15:28:08 2016
@@ -10660,8 +10660,7 @@ void NVPTX::Assembler::ConstructJob(Comp
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() && "Wrong platform");
std::vector<std::string> gpu_archs =
Args.getAllArgValues(options::OPT_march_EQ);
@@ -10729,8 +10728,7 @@ void NVPTX::Linker::ConstructJob(Compila
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() && "Wrong platform");
ArgStringList CmdArgs;
CmdArgs.push_back("--cuda");
More information about the cfe-commits
mailing list