[PATCH] D78726: [CUDA] Define __CUDACC_DEBUG__ when compiling device code in debug mode
Raul Tambre via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 23 11:21:25 PDT 2020
tambre abandoned this revision.
tambre marked an inline comment as done.
tambre added a comment.
Abandoning as there are good reasons to not add this.
================
Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:632
+ if (mustEmitDebugInfo(DriverArgs) == EmitSameDebugInfoAsHost)
+ CC1Args.push_back("-D__CUDACC_DEBUG__");
+
----------------
tra wrote:
> 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.
>
>
>
>
Agreed.
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