[PATCH] D125904: [Cuda] Use fallback method to mangle externalized decls if no CUID given
Joseph Huber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 24 09:02:59 PDT 2022
jhuber6 added inline comments.
================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:6845-6846
+ llvm::MD5::MD5Result Result;
+ for (const auto &Arg : PreprocessorOpts.Macros)
+ Hash.update(Arg.first);
+ Hash.final(Result);
----------------
yaxunl wrote:
> Are these options always the same for device and host compilation?
>
> If not, this may not work since host and device compilation will have different names for the same variable.
This should only be definitions passed to the front-end via `-D`. There's a handful of these that the Clang driver will pass in, e.g. `-D__GCC_HAVE_DWARF2_CFI_ASM=1`, but as far as I know it's consistent between host and device compilations.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125904/new/
https://reviews.llvm.org/D125904
More information about the cfe-commits
mailing list