[PATCH] D54523: [Preamble] Reuse preamble even if an unsaved file does not exist
Nikolai Kosjar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 14 05:35:19 PST 2018
nik created this revision.
Herald added a subscriber: cfe-commits.
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.
Repository:
rC Clang
https://reviews.llvm.org/D54523
Files:
include/clang/Frontend/ASTUnit.h
lib/Frontend/ASTUnit.cpp
lib/Frontend/PrecompiledPreamble.cpp
unittests/Frontend/PCHPreambleTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54523.174020.patch
Type: text/x-patch
Size: 11246 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181114/edb27e17/attachment.bin>
More information about the cfe-commits
mailing list