[PATCH] D91421: Fix temporary file name on Windows
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 13 12:28:10 PST 2020
yaxunl added inline comments.
================
Comment at: clang/lib/Driver/Driver.cpp:4645
+ // therefore replace it with '%'.
+ std::replace(BoundArch.begin(), BoundArch.end(), ':', '%');
+#endif
----------------
tra wrote:
> Windows `cmd` shell uses `%` to reference environment variables. The character is valid for a path, but that would be similar to using `$` in the path name on Linux -- doable, but rather inconvenient to deal with.
>
> Perhaps a less special character would be a better choice. `_`, `.`, or `@` ?
I would choose '@' if '%' is not favored. In some cases we may want to recover the bound arch from the temporary file name. '.' and '_' makes it difficult to recover.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91421/new/
https://reviews.llvm.org/D91421
More information about the cfe-commits
mailing list