This revision was automatically updated to reflect the committed changes.
Closed by commit rL295301: Cache FileID when translating diagnostics in PCH
files (authored by erikjv).
Changed prior to commit:
https://reviews.llvm.org/D29755?vs=88366&id=88701#toc
Repository:
rL LLVM
https://review
bkramer accepted this revision.
bkramer added a comment.
This revision is now accepted and ready to land.
lg
https://reviews.llvm.org/D29755
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
erikjv updated this revision to Diff 88366.
https://reviews.llvm.org/D29755
Files:
lib/Frontend/ASTUnit.cpp
Index: lib/Frontend/ASTUnit.cpp
===
--- lib/Frontend/ASTUnit.cpp
+++ lib/Frontend/ASTUnit.cpp
@@ -2539,14 +2539,19 @@
ahatanak added inline comments.
Comment at: lib/Frontend/ASTUnit.cpp:2551
continue;
-FileID FID = SrcMgr.translateFile(FE);
+FileID FID;
+if (FE == CachedFE) {
Since FID is always equal to CachedFID, I think you can simplify this a bit by
remo
erikjv created this revision.
Modules/preambles/PCH files can contain diagnostics, which, when used,
are added to the current ASTUnit. For that to work, they are translated
to use the current FileManager's FileIDs. When the entry is not the
main file, all local source locations will be checked by