[cfe-commits] r142633 - in /cfe/trunk: include/clang/Driver/CC1Options.td include/clang/Frontend/CodeGenOptions.h lib/CodeGen/CGDebugInfo.cpp lib/Driver/Tools.cpp lib/Frontend/CompilerInvocation.cpp test/CodeGen/debug-info-compilation-dir.c test/

Nick Lewycky nicholas at mxc.ca
Sat Oct 22 12:27:01 PDT 2011

Chandler Carruth wrote:
> On Sat, Oct 22, 2011 at 3:08 AM, NAKAMURA Takumi <geek4civic at gmail.com
> <mailto:geek4civic at gmail.com>> wrote:
>     I don't understand what you would like to do here, though, it must be
>     bogus to check pwd[0] eq '/' on win32 hosts.
> Your fix (is_absolute) is the correct fix.

Checking against the GCC source, there's an #ifdef for VMS || _WIN32 && 
!__CYGWIN__ around the implementation of getpwd(), and in that case it 
returns whatever getcwd() returned with no validity checking at all. 
Note that this ignores %PWD%.

That said, I'm happy to put the is_absolute test in there, it makes sense.


More information about the cfe-commits mailing list