Hi mcrosier,

Seems that gcc looks for precompiled header in all include directories. Should 
we be doing this for all extensions?

http://reviews.llvm.org/D10431

Files:
  lib/Driver/Tools.cpp

Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -394,6 +394,16 @@
         if (llvm::sys::fs::exists(P)) {
           FoundPCH = UsePCH;
           FoundPTH = !UsePCH;
+        } else {
+          for (const Arg *A : Args.filtered(options::OPT_I_Group)) {
+            SmallString<128> Path(A->getValue());
+            llvm::sys::path::append(Path, P);
+            if (llvm::sys::fs::exists(Path)) {
+              P = Path;
+              FoundPCH = UsePCH;
+              FoundPTH = !UsePCH;
+            }
+          }
         }
       }

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -394,6 +394,16 @@
         if (llvm::sys::fs::exists(P)) {
           FoundPCH = UsePCH;
           FoundPTH = !UsePCH;
+        } else {
+          for (const Arg *A : Args.filtered(options::OPT_I_Group)) {
+            SmallString<128> Path(A->getValue());
+            llvm::sys::path::append(Path, P);
+            if (llvm::sys::fs::exists(Path)) {
+              P = Path;
+              FoundPCH = UsePCH;
+              FoundPTH = !UsePCH;
+            }
+          }
         }
       }
 
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to