aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-10-22 23:51:00 +0000
committerDouglas Gregor <dgregor@apple.com>2012-10-22 23:51:00 +0000
commit4b29c16eecb780c9db5e402707e5350e6a292587 (patch)
tree9efa77063c0ff87fd851063b8de92ed21ffec0d3 /clang/lib/Frontend/CompilerInstance.cpp
parent12cda50f1f043a3b8d41dbd8c5becdbd8fe16b6d (diff)
downloadllvm-4b29c16eecb780c9db5e402707e5350e6a292587.zip
llvm-4b29c16eecb780c9db5e402707e5350e6a292587.tar.gz
llvm-4b29c16eecb780c9db5e402707e5350e6a292587.tar.bz2
Allow clients of the AST reader to specify what kinds of AST load
failures they know how to tolerate, e.g., out-of-date input files or configuration/version mismatches. Suppress the corresponding diagnostics if the client can handle it. No clients actually use this functionality, yet. llvm-svn: 166449
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 225bc137..3806f57 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -343,7 +343,8 @@ CompilerInstance::createPCHExternalASTSource(StringRef Path,
static_cast<ASTDeserializationListener *>(DeserializationListener));
switch (Reader->ReadAST(Path,
Preamble ? serialization::MK_Preamble
- : serialization::MK_PCH)) {
+ : serialization::MK_PCH,
+ ASTReader::ARR_None)) {
case ASTReader::Success:
// Set the predefines buffer as suggested by the PCH reader. Typically, the
// predefines buffer will be empty.
@@ -965,7 +966,8 @@ Module *CompilerInstance::loadModule(SourceLocation ImportLoc,
// Try to load the module we found.
switch (ModuleManager->ReadAST(ModuleFile->getName(),
- serialization::MK_Module)) {
+ serialization::MK_Module,
+ ASTReader::ARR_None)) {
case ASTReader::Success:
break;