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:
NAKAMURA Takumi 2011-10-22 10:25:25 +00:00
parent 607ddc571e
commit b5e6fa2949
1 changed files with 1 additions and 1 deletions

View File

@ -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));