[PATCH] D95007: [CUDA][HIP] Add -fuse-cuid

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 20 10:47:13 PST 2021


tra added inline comments.
Herald added a reviewer: jansvoboda11.


================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:2307
+  // Only alphanumeric and underscore is allowed in -cuid option.
+  if (auto *A = Args.getLastArg(OPT_cuid_EQ)) {
+    const char *V = A->getValue();
----------------
JonChesterfield wrote:
> Why this limitation? In particular I can imagine people using an id based on a filesystem location, which introduces /\:. and possibly other characters.
I guess one of the reasons is that CUID is used to create unique externally visible symbol names, so the charset is sort of the lowest common denominator that could be directly used in the symbol name.

We could work around that by accepting an arbitrary string as a CUID and then using its hash to create unique stable suffix.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95007/new/

https://reviews.llvm.org/D95007



More information about the cfe-commits mailing list