diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2011-10-22 10:25:25 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2011-10-22 10:25:25 +0000 |
commit | 813a40750f7e8cd1e09a8aa1091283224a6adf21 (patch) | |
tree | 39e25c8218c3d39e62237d0596395edd718ebb5b /lib/Driver/Tools.cpp | |
parent | 5e745da03df27ac620b0a5cc280d0d1757cfbac1 (diff) |
lib/Driver/Tools.cpp: Use PathV2::is_absolute() to add -fdebug-compilation-dir. pwd[0] might not be '/' on Win32 hosts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142720 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index ad32bc7d1b..e6f5b24cce 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -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)); |