]> granicus.if.org Git - clang/commitdiff
lib/Frontend/InitHeaderSearch.cpp: Tweak AddPath() to accept "/foo/bar" (not "X:...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 2 May 2011 04:50:10 +0000 (04:50 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 2 May 2011 04:50:10 +0000 (04:50 +0000)
FIXME: We should consider better isysroot scheme on Win32 hosts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130683 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/InitHeaderSearch.cpp
test/PCH/reloc.c

index 3da38fb0463130361119b549a8f1e82548893f6c..c552512dc9572940879fe49886947b632029cefa 100644 (file)
@@ -118,7 +118,12 @@ void InitHeaderSearch::AddPath(const llvm::Twine &Path,
 
   // Handle isysroot.
   if ((Group == System || Group == CXXSystem) && !IgnoreSysRoot &&
+#if defined(_WIN32)
+      !MappedPathStr.empty() &&
+      llvm::sys::path::is_separator(MappedPathStr[0]) &&
+#else
       llvm::sys::path::is_absolute(MappedPathStr) &&
+#endif
       IsNotEmptyOrRoot) {
     MappedPathStorage.clear();
     MappedPathStr =
index f15c77682fd85e39680a09a3275b453541b676f0..fd78feba604784dc1be3b378f3cf57c5404acacc 100644 (file)
@@ -1,7 +1,7 @@
 // RUN: %clang_cc1 -emit-pch -o %t -relocatable-pch -isysroot %S/libroot %S/libroot/usr/include/reloc.h
 // RUN: %clang_cc1 -include-pch %t -isysroot %S/libroot %s -verify
 // RUN: not %clang_cc1 -include-pch %t %s
-// XFAIL: mingw,win32
+
 #include <reloc.h>
 
 int x = 2; // expected-error{{redefinition}}