forked from OSchip/llvm-project
lib/Driver/Tools.cpp: Use PathV2::is_absolute() to add -fdebug-compilation-dir. pwd[0] might not be '/' on Win32 hosts.
llvm-svn: 142720
This commit is contained in:
parent
607ddc571e
commit
b5e6fa2949
|
@ -1628,7 +1628,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
if (const char *pwd = ::getenv("PWD")) {
|
||||
// GCC also verifies that stat(pwd) and stat(".") have the same inode
|
||||
// number. Not doing those because stats are slow, but we could.
|
||||
if (pwd[0] == '/') {
|
||||
if (llvm::sys::path::is_absolute(pwd)) {
|
||||
std::string CompDir = pwd;
|
||||
CmdArgs.push_back("-fdebug-compilation-dir");
|
||||
CmdArgs.push_back(Args.MakeArgString(CompDir));
|
||||
|
|
Loading…
Reference in New Issue