[PATCH] D143509: Move the BySpelling map to IncludeStructure.
Viktoriia Bakalova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 10 07:18:23 PST 2023
VitaNuo added a comment.
Thanks for review!
================
Comment at: clang-tools-extra/clangd/Headers.h:164
+ llvm::StringMap<llvm::SmallVector<IncludeStructure::HeaderID>>
+ buildMainFileIncludesBySpelling() const {
+ llvm::StringMap<llvm::SmallVector<IncludeStructure::HeaderID>> BySpelling;
----------------
kadircet wrote:
> instead of building this on-demand, what about building it as we're collecting directives around https://github.com/llvm/llvm-project/blob/main/clang-tools-extra/clangd/Headers.cpp#L52 ?
>
> afterwards we can just have a lookup function exposed here, that returns an `ArrayRef<HeaderID>` ?
That's a great idea. I was thinking about this, but didn't know where to put it, so I thought if it was possible, you'd point out in review ;-)
Thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143509/new/
https://reviews.llvm.org/D143509
More information about the cfe-commits
mailing list