summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/FrontendActions.cpp
diff options
context:
space:
mode:
authorBen Langmuir <blangmuir@apple.com>2014-02-05 22:21:15 +0000
committerBen Langmuir <blangmuir@apple.com>2014-02-05 22:21:15 +0000
commit2cb4a78f9394359e3bb74060774e2245bcb9f4b7 (patch)
tree712d0ddca4e53867a288b5597be5efec6029a1bf /clang/lib/Frontend/FrontendActions.cpp
parent87769713cf385f373f3bc1c28913045f49277d7f (diff)
downloadbcm5719-llvm-2cb4a78f9394359e3bb74060774e2245bcb9f4b7.tar.gz
bcm5719-llvm-2cb4a78f9394359e3bb74060774e2245bcb9f4b7.zip
Add a CC1 option -verify-pch
This option will: - load the given pch file - verify it is not out of date by stat'ing dependencies, and - return 0 on success and non-zero on error llvm-svn: 200884
Diffstat (limited to 'clang/lib/Frontend/FrontendActions.cpp')
-rw-r--r--clang/lib/Frontend/FrontendActions.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp
index 0d78bf032e3..8b174605ffd 100644
--- a/clang/lib/Frontend/FrontendActions.cpp
+++ b/clang/lib/Frontend/FrontendActions.cpp
@@ -320,6 +320,19 @@ ASTConsumer *DumpModuleInfoAction::CreateASTConsumer(CompilerInstance &CI,
return new ASTConsumer();
}
+ASTConsumer *VerifyPCHAction::CreateASTConsumer(CompilerInstance &CI,
+ StringRef InFile) {
+ return new ASTConsumer();
+}
+
+void VerifyPCHAction::ExecuteAction() {
+ getCompilerInstance().
+ createPCHExternalASTSource(getCurrentFile(), /*DisablePCHValidation*/false,
+ /*AllowPCHWithCompilerErrors*/false,
+ /*AllowConfigurationMismatch*/true,
+ /*DeserializationListener*/0);
+}
+
namespace {
/// \brief AST reader listener that dumps module information for a module
/// file.
OpenPOWER on IntegriCloud