} else {
switch (static_cast<BuildPreambleError>(NewPreamble.getError().value())) {
case BuildPreambleError::CouldntCreateTempFile:
- case BuildPreambleError::PreambleIsEmpty:
// Try again next time.
PreambleRebuildCounter = 1;
return nullptr;
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 =
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
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: