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 | b5e6fa294996243cb322ab192bee095e8d967873 (patch) | |
tree | c724f8b02bd8ce197e315cc0208e05f207e9ebaa /clang/lib/Driver/Tools.cpp | |
parent | 607ddc571ef5cf3de6361095994e50e6c50499f4 (diff) | |
download | bcm5719-llvm-b5e6fa294996243cb322ab192bee095e8d967873.tar.gz bcm5719-llvm-b5e6fa294996243cb322ab192bee095e8d967873.zip |
lib/Driver/Tools.cpp: Use PathV2::is_absolute() to add -fdebug-compilation-dir. pwd[0] might not be '/' on Win32 hosts.
llvm-svn: 142720
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index ad32bc7d1b4..e6f5b24ccef 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/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)); |