[PATCH] D53587: [clangd] Truncate SymbolID to 16 bytes.

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 23 10:13:11 PDT 2018


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

We should watch out for the downstream backward compatibility.



================
Comment at: clangd/index/Index.h:92
 // As USRs (Unified Symbol Resolution) could be large, especially for functions
-// with long type arguments, SymbolID is using 160-bits SHA1(USR) values to
+// with long type arguments, SymbolID is using SHA1(USR) values to
 // guarantee the uniqueness of symbols while using a relatively small amount of
----------------
maybe `SHA1(USR) truncated at RawSize bytes`?


================
Comment at: clangd/index/Serialization.cpp:303
 // A refs section has data grouped by Symbol. Each symbol has:
-//  - SymbolID: 20 bytes
+//  - SymbolID: 16 bytes
 //  - NumRefs: varint
----------------
A reminder from yourself: bump the binary version ;)


================
Comment at: clangd/index/Serialization.cpp:303
 // A refs section has data grouped by Symbol. Each symbol has:
-//  - SymbolID: 20 bytes
+//  - SymbolID: 16 bytes
 //  - NumRefs: varint
----------------
ioeric wrote:
> A reminder from yourself: bump the binary version ;)
maybe use RawSize here instead of hardcoding?


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D53587





More information about the cfe-commits mailing list