summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r--clang/lib/Frontend/ASTUnit.cpp1
-rw-r--r--clang/lib/Frontend/PrecompiledPreamble.cpp8
2 files changed, 0 insertions, 9 deletions
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp
index e4c313fed30..701f07f22e3 100644
--- a/clang/lib/Frontend/ASTUnit.cpp
+++ b/clang/lib/Frontend/ASTUnit.cpp
@@ -1363,7 +1363,6 @@ ASTUnit::getMainBufferWithPrecompiledPreamble(
} else {
switch (static_cast<BuildPreambleError>(NewPreamble.getError().value())) {
case BuildPreambleError::CouldntCreateTempFile:
- case BuildPreambleError::PreambleIsEmpty:
// Try again next time.
PreambleRebuildCounter = 1;
return nullptr;
diff --git a/clang/lib/Frontend/PrecompiledPreamble.cpp b/clang/lib/Frontend/PrecompiledPreamble.cpp
index 30ae2db26d8..4bff339711d 100644
--- a/clang/lib/Frontend/PrecompiledPreamble.cpp
+++ b/clang/lib/Frontend/PrecompiledPreamble.cpp
@@ -237,9 +237,6 @@ llvm::ErrorOr<PrecompiledPreamble> PrecompiledPreamble::Build(
PreambleCallbacks &Callbacks) {
assert(VFS && "VFS is null");
- if (!Bounds.Size)
- return BuildPreambleError::PreambleIsEmpty;
-
auto PreambleInvocation = std::make_shared<CompilerInvocation>(Invocation);
FrontendOptions &FrontendOpts = PreambleInvocation->getFrontendOpts();
PreprocessorOptions &PreprocessorOpts =
@@ -423,9 +420,6 @@ bool PrecompiledPreamble::CanReuse(const CompilerInvocation &Invocation,
PreprocessorOptions &PreprocessorOpts =
PreambleInvocation->getPreprocessorOpts();
- if (!Bounds.Size)
- return false;
-
// We've previously computed a preamble. Check whether we have the same
// preamble now that we did before, and that there's enough space in
// the main-file buffer within the precompiled preamble to fit the
@@ -758,8 +752,6 @@ const char *BuildPreambleErrorCategory::name() const noexcept {
std::string BuildPreambleErrorCategory::message(int condition) const {
switch (static_cast<BuildPreambleError>(condition)) {
- case BuildPreambleError::PreambleIsEmpty:
- return "Preamble is empty";
case BuildPreambleError::CouldntCreateTempFile:
return "Could not create temporary file for PCH";
case BuildPreambleError::CouldntCreateTargetInfo:
OpenPOWER on IntegriCloud