Track the RequestingModule in the HeaderSearch LookupFile cache.
authorRichard Smith <richard@metafoo.co.uk>
Fri, 21 Jul 2023 21:53:36 +0000 (14:53 -0700)
committerRichard Smith <richard@metafoo.co.uk>
Fri, 21 Jul 2023 22:49:47 +0000 (15:49 -0700)
commit7c5e4efb099e0badb4912467b7286938a4ed5011
tree19ac8ab519b9ceb0f1d1ee44f2ee845fa92dbdea
parent24d293913c211c43af4d1ab0a23ab66d58aea6df
Track the RequestingModule in the HeaderSearch LookupFile cache.

Different requesting modules can have different lookup results, so don't
cache results across modules.

Fixes a regression introduced in reviews.llvm.org/D132779.

Test case based on one provided by Jan Svoboda.

Reviewed By: jansvoboda11

Differential Revision: https://reviews.llvm.org/D156000
clang/include/clang/Lex/HeaderSearch.h
clang/lib/Lex/HeaderSearch.cpp
clang/test/Modules/lookup-file-cache.cpp [new file with mode: 0644]