This is an archive of the discontinued LLVM Phabricator instance.

Add index-while-building support to Clang - Part 3
AbandonedPublic

Authored by jkorous on Dec 19 2017, 11:33 AM.

Details

Reviewers
nathawes
Summary

See Part 1 (https://reviews.llvm.org/D39050) for an overview of the new functionality.

Part 1 added a new -index-store-path option that added a new FrontendAction – WrappingIndexRecordAction – to collect indexing information during compilation. Part 2 contained the changes to write the collected information out to the directory supplied by the -index-store-path option in the LLVM Bitstream format, as a collection of unit and record files.
This part adds a new IndexStore library to help clients read and manage the indexing data in index store directory. It abstracts away the directory layout and file format of the store and, combined with the new DirectoryWatcher, also notifies clients whenever a unit file is updated.

Diff Detail

Event Timeline

nathawes created this revision.Dec 19 2017, 11:33 AM
nathawes planned changes to this revision.Dec 19 2017, 11:34 AM

This needs to be reworked to remove its dependence on blocks.

nathawes updated this revision to Diff 153194.Jun 27 2018, 3:35 PM

Updated to apply on the updated first and second patches + formatting fixes.

nathawes planned changes to this revision.Jun 27 2018, 3:36 PM
yvvan added a subscriber: yvvan.Jun 29 2018, 2:44 AM

I can't really test this one because INDEXSTORE_HAS_BLOCKS is apple-specific and it's required to rewrite all block-related stuff to use that code

yvvan added a comment.Jun 29 2018, 3:36 AM

Will it work if I replace every block-related code here with llvm::function_ref<>?

@yvvan I'm not sure, sorry. I plan on removing/adding alternatives for the Apple specific bits and opening these up for review over the next two weeks if you're ok to wait a little longer.

yvvan added a comment.Jul 1 2018, 11:06 PM

@nathawes I've already started changing so I can hopefully share my code with you when I fix all undefined symbols :)

That would be great @yvvan – thanks!

yvvan added a comment.Jul 3 2018, 6:07 AM

So I have that working on windows with clang-cl (probably broke something else during the porting, need to recheck.
One more commit I have in my working tree is YAML export to be able to use it for clangd. The quality of code is currently not so good so I probably need some extra time to make it ok-ish. But i hope to have it posted to reviews this week (unless I have something urgent)

jkorous commandeered this revision.Mar 6 2019, 10:45 AM
jkorous added a reviewer: nathawes.
jkorous abandoned this revision.Mar 6 2019, 10:46 AM

It's time to officially abandon these patches in favor of new push for upstreaming index-while-building.

Current reviews in progress
https://reviews.llvm.org/D58749
https://reviews.llvm.org/D58418

RFC
http://lists.llvm.org/pipermail/cfe-dev/2019-February/061432.html

I'll address comments for this patch in the new set of patches and I'll add original reviewers.