This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Deduplicate symbols collected in global-symbol-builder tool.
ClosedPublic

Authored by ioeric on Jan 16 2018, 10:03 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

ioeric created this revision.Jan 16 2018, 10:03 AM
sammccall accepted this revision.Jan 17 2018, 8:18 AM
sammccall added inline comments.
clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp
109 ↗(On Diff #129984)

nit: this comment could be tightened up a bit:

// FIXME(ioeric): Merge occurrences, rather than just dropping all but one.
// Definitions and forward declarations have the same key and may both have information.
// Usage count will need to be aggregated across occurrences, too.
113 ↗(On Diff #129984)

nit: UniqueSymbols? "Reduce" makes sense from an MR perspective but there's not enough context.

116 ↗(On Diff #129984)

picking the longest string might be better than random, but I'm not sure if it's enough to be worthwhile.

This revision is now accepted and ready to land.Jan 17 2018, 8:18 AM
ioeric updated this revision to Diff 130207.Jan 17 2018, 10:07 AM
ioeric marked 3 inline comments as done.

Addressed review comments.

ioeric added inline comments.Jan 17 2018, 10:07 AM
clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp
109 ↗(On Diff #129984)

Thanks!

This revision was automatically updated to reflect the committed changes.