From b2db45065c75fa728f7a8470dda4873bde59aede Mon Sep 17 00:00:00 2001 From: Justin Lebar Date: Sat, 23 Jan 2016 21:28:08 +0000 Subject: [PATCH] [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 --- clang/lib/Driver/Tools.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 24a726b6ec7f..6a1517f18070 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -10660,8 +10660,7 @@ void NVPTX::Assembler::ConstructJob(Compilation &C, const JobAction &JA, const char *LinkingOutput) const { const auto &TC = static_cast(getToolChain()); - assert(TC.getArch() == llvm::Triple::nvptx || - TC.getArch() == llvm::Triple::nvptx64); + assert(TC.getTriple().isNVPTX() && "Wrong platform"); std::vector 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(getToolChain()); - assert(TC.getArch() == llvm::Triple::nvptx || - TC.getArch() == llvm::Triple::nvptx64); + assert(TC.getTriple().isNVPTX() && "Wrong platform"); ArgStringList CmdArgs; CmdArgs.push_back("--cuda");