[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

llvm-svn: 258640
This commit is contained in:
Justin Lebar 2016-01-23 21:28:08 +00:00
parent 561d5a1758
commit b2db45065c
1 changed files with 2 additions and 4 deletions

View File

@ -10660,8 +10660,7 @@ void NVPTX::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
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(Compilation &C, const JobAction &JA,
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");