[PATCH] D135132: [SourceManager] Improve getFileIDLocal.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 5 00:35:13 PDT 2022


hokein added inline comments.


================
Comment at: clang/lib/Basic/SourceManager.cpp:897
   // actually a lower index!
   unsigned GreaterIndex = I;
   unsigned LessIndex = LoadedSLocEntryTable.size();
----------------
sammccall wrote:
> is the same optimization available here?
> I think getFileIDLoaded() is important for module builds and when we use PCH.
> Though admittedly I don't think this is relevant to the lexer path we've been looking at: those locations should always be local.
Yeah. That's my next step. I plan to send a separate patch for it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135132



More information about the cfe-commits mailing list