[PATCH] D78726: [CUDA] Define __CUDACC_DEBUG__ when compiling device code in debug mode
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 23 10:16:10 PDT 2020
tra added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:632
+ if (mustEmitDebugInfo(DriverArgs) == EmitSameDebugInfoAsHost)
+ CC1Args.push_back("-D__CUDACC_DEBUG__");
+
----------------
Built-in preprocessor macros are defined in clang/lib/Frontend/InitPreprocessor.cpp, so the change should ideally go there.
Also, it's not clear what exactly does the macro mean. I am not convinced that clang must set this macro. Clang is not 1:1 compatible with NVCC anyways, and I'd rather not add quirks unless they are absolutely necessary. In this case, it can be easily added by the user.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78726/new/
https://reviews.llvm.org/D78726
More information about the cfe-commits
mailing list