Index: lib/Frontend/PrecompiledPreamble.cpp =================================================================== --- lib/Frontend/PrecompiledPreamble.cpp +++ lib/Frontend/PrecompiledPreamble.cpp @@ -416,6 +416,9 @@ Bounds.Size <= MainFileBuffer->getBufferSize() && "Buffer is too large. Bounds were calculated from a different buffer?"); + if (Bounds.Size == 0) + return PreambleBytes.size() == Bounds.Size; + auto PreambleInvocation = std::make_shared(Invocation); PreprocessorOptions &PreprocessorOpts = PreambleInvocation->getPreprocessorOpts();