[cfe-commits] r142720 - /cfe/trunk/lib/Driver/Tools.cpp

NAKAMURA Takumi geek4civic at gmail.com
Sat Oct 22 03:25:25 PDT 2011


Author: chapuni
Date: Sat Oct 22 05:25:25 2011
New Revision: 142720

URL: http://llvm.org/viewvc/llvm-project?rev=142720&view=rev
Log:
lib/Driver/Tools.cpp: Use PathV2::is_absolute() to add -fdebug-compilation-dir. pwd[0] might not be '/' on Win32 hosts.

Modified:
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=142720&r1=142719&r2=142720&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Sat Oct 22 05:25:25 2011
@@ -1628,7 +1628,7 @@
   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));





More information about the cfe-commits mailing list