[PATCH] D41483: [clangd] Index symbols share storage within a slab.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 21 06:53:12 PST 2017


hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.

Nice, LGTM.



================
Comment at: clangd/index/Index.h:108
 //
 // FIXME: Use a space-efficient implementation, a lot of Symbol fields could
 // share the same storage.
----------------
Do you want to remove this `FIXME` now or later?


================
Comment at: clangd/index/Index.h:129
 private:
+  void intern(llvm::StringRef &S) {
+    S = S.empty() ? llvm::StringRef() : Strings.insert(S).first->getKey();
----------------
nit: worth a comment here.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D41483





More information about the cfe-commits mailing list