[PATCH] D134694: Clean up isBeforeInTranslationUnit cache and add eviction.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 26 19:53:36 PDT 2022


sammccall created this revision.
Herald added a project: All.
sammccall requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Previously the first 300 entries would stay around forever, and any new queries
would thrash on entry 301.
The cache code/data structures were more complicated than necessary.

Cleaned up the interface to isInSameTranslationUnit, which had unspecified
side-effects that other code was relying on.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D134694

Files:
  clang/include/clang/Basic/SourceManager.h
  clang/lib/Basic/SourceManager.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134694.463080.patch
Type: text/x-patch
Size: 15524 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220927/67e531d4/attachment-0001.bin>


More information about the cfe-commits mailing list