This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Don't rebuild background index until we indexed one TU per thread.
ClosedPublic

Authored by sammccall on Jul 12 2019, 5:23 PM.

Details

Summary

This increases the odds that the boosted file (cpp file matching header)
will be ready. (It always enqueues first, so it'll be present unless
another thread indexes *two* files before the first thread indexes one.)

Diff Detail

Repository
rL LLVM

Event Timeline

sammccall created this revision.Jul 12 2019, 5:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 12 2019, 5:23 PM
kadircet accepted this revision.Jul 15 2019, 3:04 AM
kadircet added inline comments.
clang-tools-extra/clangd/index/BackgroundRebuild.h
51 ↗(On Diff #209651)

let's not have a default here since it will get out-dated if we decide to change default for BackgroundIndex's constructor.

This revision is now accepted and ready to land.Jul 15 2019, 3:04 AM
This revision was automatically updated to reflect the committed changes.
sammccall marked an inline comment as done.