[PATCH] D33493: Speed up preamble loading

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 8 10:04:41 PDT 2017


arphaman accepted this revision.
arphaman added a comment.
This revision is now accepted and ready to land.

LGTM with one inline request below.

I also have a question: what kind of performance benefits do you get for the preamble load times?



================
Comment at: lib/Frontend/ASTUnit.cpp:2620
+    if (ItFileID == PreambleSrcLocCache.end()) {
       FID = SrcMgr.translateFile(FE);
+      FileLoc = SrcMgr.getLocForStartOfFile(FID);
----------------
Please move the `FileID FID` declaration from above into here because we only use it in this `if`.


https://reviews.llvm.org/D33493





More information about the cfe-commits mailing list