Make all PCH-incompatibility warnings into errors, and abort
compilation if the user requested a PCH file but no such PCH file
exists.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70332 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/clang-cc/clang-cc.cpp b/tools/clang-cc/clang-cc.cpp
index ad00664..1fa49c1 100644
--- a/tools/clang-cc/clang-cc.cpp
+++ b/tools/clang-cc/clang-cc.cpp
@@ -1775,15 +1775,19 @@
return;
case PCHReader::IgnorePCH:
- // No suitable PCH file could be found. Just ignore the
- // -include-pch option entirely.
-
+ // No suitable PCH file could be found. Return an error.
+ return;
+
+#if 0
+ // FIXME: We can recover from failed attempts to load PCH
+ // files. This code will do so, if we ever want to enable it.
+
// We delayed the initialization of builtins in the hope of
// loading the PCH file. Since the PCH file could not be
// loaded, initialize builtins now.
if (ContextOwner)
ContextOwner->InitializeBuiltins(PP.getIdentifierTable());
- break;
+#endif
}
// Finish preprocessor initialization. We do this now (rather