[PATCH] D41005: Reuse preamble even if an unsaved file does not exist

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 8 07:46:00 PDT 2019


ilya-biryukov added a comment.

Again, sorry for the delay. This looks good, just a few NITs from me before I stamp it



================
Comment at: lib/Frontend/PrecompiledPreamble.cpp:457
 
+  llvm::StringMap<PreambleFileHash> OverridenFileBuffers;
   for (const auto &RB : PreprocessorOpts.RemappedFileBuffers) {
----------------
Could you add a comment that this contains only the files there were not found on disk (i.e. the vfs call failed and we couldn't get a `UniqueID`)


================
Comment at: lib/Frontend/PrecompiledPreamble.cpp:472
+    if (OverridenFileBuffer != OverridenFileBuffers.end()) {
+      // The file's buffer was remapped; check whether it matches up
+      // with the previous mapping.
----------------
NIT: change to: The file's buffer was remapped **and the file was not found in VFS**


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D41005/new/

https://reviews.llvm.org/D41005





More information about the cfe-commits mailing list