If the precompiled header named by "-include" is actually a directory,
authorDouglas Gregor <dgregor@apple.com>
Tue, 23 Oct 2012 06:18:24 +0000 (06:18 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 23 Oct 2012 06:18:24 +0000 (06:18 +0000)
commitfc9e7a2969650e52a87864a6a79bd37b42ea33e3
tree6c2443b774cf45deb6725e8ba96d5d9f2323cc0b
parentabf836cffa8ea53e67f56fddc49ed7063f7a0e85
If the precompiled header named by "-include" is actually a directory,
check each of the files within that directory to determine if any of
them is an AST file that matches the language and target options. If
so, the first matching AST file is loaded. This fixes a longstanding
discrepency with GCC's precompiled header implementation.

llvm-svn: 166469
clang/include/clang/Basic/DiagnosticFrontendKinds.td
clang/include/clang/Serialization/ASTReader.h
clang/lib/Frontend/ASTUnit.cpp
clang/lib/Frontend/FrontendAction.cpp
clang/lib/Serialization/ASTReader.cpp
clang/test/PCH/badpch.c
clang/test/PCH/pch-dir.c [new file with mode: 0644]
clang/test/PCH/pch-dir.h [new file with mode: 0644]