summaryrefslogtreecommitdiffstats
path: root/clang/include/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang/include/clang')
-rw-r--r--clang/include/clang/Basic/DiagnosticFrontendKinds.td2
-rw-r--r--clang/include/clang/Frontend/PCHReader.h6
2 files changed, 8 insertions, 0 deletions
diff --git a/clang/include/clang/Basic/DiagnosticFrontendKinds.td b/clang/include/clang/Basic/DiagnosticFrontendKinds.td
index ff49388f49c..678cd3a2aa1 100644
--- a/clang/include/clang/Basic/DiagnosticFrontendKinds.td
+++ b/clang/include/clang/Basic/DiagnosticFrontendKinds.td
@@ -129,4 +129,6 @@ def warn_macro_name_used_in_pch : Warning<
def warn_pch_compiler_options_mismatch : Warning<
"compiler options used when building the precompiled header differ from "
"the options used when using the precompiled header">;
+def err_not_a_pch_file : Error<
+ "'%0' does not appear to be a precompiled header file">, DefaultFatal;
}
diff --git a/clang/include/clang/Frontend/PCHReader.h b/clang/include/clang/Frontend/PCHReader.h
index cd23cac84b3..e5591fe6311 100644
--- a/clang/include/clang/Frontend/PCHReader.h
+++ b/clang/include/clang/Frontend/PCHReader.h
@@ -312,6 +312,12 @@ private:
void LoadedDecl(unsigned Index, Decl *D);
Decl *ReadDeclRecord(uint64_t Offset, unsigned Index);
+ /// \brief Produce an error diagnostic and return true.
+ ///
+ /// This routine should only be used for fatal errors that have to
+ /// do with non-routine failures (e.g., corrupted PCH file).
+ bool Error(const char *Msg);
+
PCHReader(const PCHReader&); // do not implement
PCHReader &operator=(const PCHReader &); // do not implement
OpenPOWER on IntegriCloud