[PATCH] PR21174 - clang only searches current working directory for precompiled include file
Nikola Smiljanić
popizdeh at gmail.com
Sun Jun 14 01:27:36 PDT 2015
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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10431.27640.patch
Type: text/x-patch
Size: 647 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150614/8a603098/attachment.bin>
More information about the cfe-commits
mailing list