]> granicus.if.org Git - clang/commitdiff
lib/Driver/Tools.cpp: Use PathV2::is_absolute() to add -fdebug-compilation-dir. pwd...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Sat, 22 Oct 2011 10:25:25 +0000 (10:25 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Sat, 22 Oct 2011 10:25:25 +0000 (10:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142720 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp

index ad32bc7d1b4e1a03ba6114afacabe015a1b91259..e6f5b24ccef1c387d299ae17488e5553a8065500 100644 (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));