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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to