[DEBUGINFO] Disable unsupported debug info options for NVPTX target.
authorAlexey Bataev <a.bataev@hotmail.com>
Fri, 27 Jul 2018 19:45:14 +0000 (19:45 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Fri, 27 Jul 2018 19:45:14 +0000 (19:45 +0000)
commitb83b4e40fe430524aa215005de3cd751e32864b7
tree90b0dbcb3f02eff3aed765031224704f6a8bd64c
parentc1d4311c1b2c9adaa9b28e2e5316fd02171e17a2
[DEBUGINFO] Disable unsupported debug info options for NVPTX target.

Summary:
Some targets support only default set of the debug options and do not
support additional debug options, like NVPTX target. Patch introduced
virtual function supportsDebugInfoOptions() that can be overloaded
by the toolchain, checks if the target supports some debug
options and emits warning when an unsupported debug option is
found.

Reviewers: echristo

Subscribers: aprantl, JDevlieghere, cfe-commits

Differential Revision: https://reviews.llvm.org/D49148

llvm-svn: 338155
clang/include/clang/Basic/DiagnosticDriverKinds.td
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Driver/ToolChain.h
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Driver/ToolChains/Cuda.cpp
clang/lib/Driver/ToolChains/Cuda.h
clang/test/Driver/cuda-dwarf-2.cu
clang/test/Driver/cuda-unsupported-debug-options.cu [new file with mode: 0644]
clang/test/Driver/openmp-offload-gpu.c
clang/test/Driver/openmp-unsupported-debug-options.c [new file with mode: 0644]