From b41f33cf0212c73eeecc28972dbd461f23e46ce3 Mon Sep 17 00:00:00 2001 From: Justin Lebar Date: Tue, 19 Apr 2016 02:27:11 +0000 Subject: [CUDA] Add --no-cuda-noopt-debug, which disables --cuda-noopt-debug. Reviewers: tra Subscribers: cfe-commits, jhen Differential Revision: http://reviews.llvm.org/D19251 llvm-svn: 266708 --- clang/lib/Driver/Tools.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Driver/Tools.cpp') diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 75424e87006..4dd860227dd 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -10956,7 +10956,8 @@ void NVPTX::Assembler::ConstructJob(Compilation &C, const JobAction &JA, ArgStringList CmdArgs; CmdArgs.push_back(TC.getTriple().isArch64Bit() ? "-m64" : "-m32"); - if (Args.getLastArg(options::OPT_cuda_noopt_device_debug)) { + if (Args.hasFlag(options::OPT_cuda_noopt_device_debug, + options::OPT_no_cuda_noopt_device_debug, false)) { // ptxas does not accept -g option if optimization is enabled, so // we ignore the compiler's -O* options if we want debug info. CmdArgs.push_back("-g"); -- cgit v1.2.3