This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Truncate SymbolID to 16 bytes.
ClosedPublic

Authored by sammccall on Oct 23 2018, 9:42 AM.

Details

Summary

The goal is 8 bytes, which has a nonzero risk of collisions with huge indexes.
This patch should shake out any issues with truncation at all, we can lower
further later.

Diff Detail

Repository
rL LLVM

Event Timeline

sammccall created this revision.Oct 23 2018, 9:42 AM
ioeric accepted this revision.Oct 23 2018, 10:13 AM

We should watch out for the downstream backward compatibility.

clangd/index/Index.h
92 ↗(On Diff #170684)

maybe SHA1(USR) truncated at RawSize bytes?

clangd/index/Serialization.cpp
303 ↗(On Diff #170684)

A reminder from yourself: bump the binary version ;)

303 ↗(On Diff #170684)

maybe use RawSize here instead of hardcoding?

This revision is now accepted and ready to land.Oct 23 2018, 10:13 AM
sammccall marked 2 inline comments as done.Oct 23 2018, 11:59 PM
sammccall added inline comments.
clangd/index/Serialization.cpp
303 ↗(On Diff #170684)

I think it's actually more important that this is concrete than that it's correct :-)

This revision was automatically updated to reflect the committed changes.