llvm-project/clang/unittests/Frontend
Nikolai Kosjar 295c19e948 [Preamble] Reuse preamble even if an unsaved file does not exist
When a preamble is created an unsaved file not existing on disk is
already part of PrecompiledPreamble::FilesInPreamble. However, when
checking whether the preamble can be re-used, a failed stat of such an
unsaved file invalidated the preamble, which led to pointless and time
consuming preamble regenerations on subsequent reparses.

Do not require anymore that unsaved files should exist on disk.

This avoids costly preamble invalidations depending on timing issues for
the cases where the file on disk might be removed just to be regenerated
a bit later.

It also allows an IDE to provide in-memory files that might not exist on
disk, e.g. because the build system hasn't generated those yet.

Differential Revision: https://reviews.llvm.org/D41005

llvm-svn: 361226
2019-05-21 07:26:59 +00:00
..
ASTUnitTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt Add explicit dependency on clangSerialization for a bunch of components to fix -DBUILD_SHARED_LIBS=on build 2018-12-12 08:02:18 +00:00
CodeGenActionTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CompilerInstanceTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FixedPointString.cpp [Fixed Point Arithmetic] Fix for FixedPointValueToString 2018-08-06 16:05:08 +00:00
FrontendActionTest.cpp Modules: Add LangOptions::CacheGeneratedPCH 2019-03-12 18:38:04 +00:00
OutputStreamTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PCHPreambleTest.cpp [Preamble] Reuse preamble even if an unsaved file does not exist 2019-05-21 07:26:59 +00:00
ParsedSourceLocationTest.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00