clang-tools 20.0.0git
|
A map from header files to an opened "proxy" file that includes them. More...
Public Member Functions | |
HeaderIncluderCache () | |
void | update (PathRef MainFile, llvm::ArrayRef< std::string > Headers) |
void | remove (PathRef MainFile) |
std::string | get (PathRef Header) const |
Get the mainfile associated with Header, or the empty string if none. | |
size_t | getUsedBytes () const |
A map from header files to an opened "proxy" file that includes them.
If you open the header, the compile command from the proxy file is used.
This inclusion information could also naturally live in the index, but there are advantages to using open files instead:
Implementation details:
All methods are threadsafe. In practice, update() comes from preamble threads, remove()s mostly from the main thread, and get() from ASTWorker. Writes are rare and reads are cheap, so we don't expect much contention.
Definition at line 248 of file TUScheduler.cpp.
|
inline |
Definition at line 305 of file TUScheduler.cpp.
References Arena.
|
inline |
Get the mainfile associated with Header, or the empty string if none.
Definition at line 336 of file TUScheduler.cpp.
|
inline |
Definition at line 341 of file TUScheduler.cpp.
|
inline |
Definition at line 324 of file TUScheduler.cpp.
References MainFile.
|
inline |
Definition at line 311 of file TUScheduler.cpp.
References MainFile.