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/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp
index 99b5fb9..ead6dcc 100644
--- a/lib/Frontend/PCHReader.cpp
+++ b/lib/Frontend/PCHReader.cpp
@@ -414,7 +414,6 @@
const std::string &Missing = MissingPredefines[I];
if (!startsWith(Missing, "#define ") != 0) {
Diag(diag::warn_pch_compiler_options_mismatch);
- Diag(diag::note_ignoring_pch) << FileName;
return true;
}
@@ -489,10 +488,8 @@
Diag(PCHMissingLoc, diag::note_using_macro_def_from_pch);
}
- if (ConflictingDefines) {
- Diag(diag::note_ignoring_pch) << FileName;
+ if (ConflictingDefines)
return true;
- }
// Determine what predefines were introduced based on command-line
// parameters that were not present when building the PCH
@@ -506,7 +503,6 @@
const std::string &Extra = ExtraPredefines[I];
if (!startsWith(Extra, "#define ") != 0) {
Diag(diag::warn_pch_compiler_options_mismatch);
- Diag(diag::note_ignoring_pch) << FileName;
return true;
}
@@ -527,8 +523,6 @@
MacroName.c_str() + MacroName.size())) {
Diag(diag::warn_macro_name_used_in_pch)
<< II;
- Diag(diag::note_ignoring_pch)
- << FileName;
return true;
}
@@ -1102,7 +1096,6 @@
if (TargetTriple != PP.getTargetInfo().getTargetTriple()) {
Diag(diag::warn_pch_target_triple)
<< TargetTriple << PP.getTargetInfo().getTargetTriple();
- Diag(diag::note_ignoring_pch) << FileName;
return IgnorePCH;
}
break;
@@ -1392,7 +1385,6 @@
#define PARSE_LANGOPT_IMPORTANT(Option, DiagID) \
if (Record[Idx] != LangOpts.Option) { \
Diag(DiagID) << (unsigned)Record[Idx] << LangOpts.Option; \
- Diag(diag::note_ignoring_pch) << FileName; \
return true; \
} \
++Idx
@@ -1446,7 +1438,6 @@
if ((LangOpts.getGCMode() != 0) != (Record[Idx] != 0)) {
Diag(diag::warn_pch_gc_mode)
<< (unsigned)Record[Idx] << LangOpts.getGCMode();
- Diag(diag::note_ignoring_pch) << FileName;
return true;
}
++Idx;