[PATCH] D126266: Mark the file entry invalid, until reread. Invalidate SLocEntry cache, readd it on reread. Do not use translateFile, because it pulls in parts of the pch.

Tapasweni Pathak via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 23 19:44:28 PDT 2022


tapaswenipathak created this revision.
tapaswenipathak added a reviewer: v.g.vassilev.
tapaswenipathak added a project: clang.
Herald added a subscriber: ormris.
Herald added a project: All.
tapaswenipathak requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Mark the file entry invalid, until reread.

      

This patch marks the file entry invalid, until reread. Invalidates SLocEntry
cache, readd it on reread. Do not use translateFile, because it pulls
in parts of the pch.

      

This adds an invalidateCache success test in filemanager and
sourcemanager, using #define public private to access private member in
the test.

      

Some more related information is available here:
https://github.com/vgvassilev/clang/pull/2.

      

Co-authored-by: Vassil Vassilev <vvasilev at cern.ch>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D126266

Files:
  include/clang/Basic/FileManager.h
  include/clang/Basic/SourceManager.h
  lib/Basic/FileManager.cpp
  lib/Basic/SourceManager.cpp
  unittests/Basic/FileManagerTest.cpp
  unittests/Basic/SourceManagerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126266.431560.patch
Type: text/x-patch
Size: 5134 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220524/d79c24e5/attachment-0001.bin>


More information about the llvm-commits mailing list