[PATCH] D53066: [RFC] [MinGW] Print paths with forward slashes in commands printed with -v
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 12 14:10:25 PDT 2018
rnk added inline comments.
================
Comment at: lib/Driver/Job.cpp:104-105
+ std::string Buf;
+ if (PathStyle == llvm::sys::path::Style::posix) {
+ Buf = llvm::sys::path::convert_to_slash(Arg);
+ Arg = Buf;
----------------
This is blindly treating every argument as if it were a path. I can imagine someone wanting to define a macro to a string value containing backslashes, such as: `-DAWESOME_MACRO="\"asdf\""`
Given that this is used for -### and crash diagnostic printing, I'm hesitant to do this here. I think it might be better to, in a cygming environment, try to convert all our paths to forward slashes before we add them to the command line.
Repository:
rC Clang
https://reviews.llvm.org/D53066
More information about the cfe-commits
mailing list