Add source.request.index_to_store to sourcekitd

This requests performs an index store index of the given file using the
given index store path and index unit output path. All other options are
derived from the index store related compiler flags.

This will allow IDEs like Xcode to index the file directly inside of
sourcekitd and potentially reuse an already built AST.
This commit is contained in:
David Goldman
2023-06-20 15:29:17 -04:00
parent 12ebe0aab8
commit d618233166
10 changed files with 191 additions and 0 deletions

View File

@@ -212,6 +212,8 @@ UID_KEYS = [
KEY('Expansions', 'key.expansions'),
KEY('MacroRoles', 'key.macro_roles'),
KEY('ExpandedMacroReplacements', 'key.expanded_macro_replacements'),
KEY('IndexStorePath', 'key.index_store_path'),
KEY('IndexUnitOutputPath', 'key.index_unit_output_path'),
]
@@ -279,6 +281,7 @@ UID_REQUESTS = [
REQUEST('EnableRequestBarriers', 'source.request.enable_request_barriers'),
REQUEST('SyntacticMacroExpansion',
'source.request.syntactic_macro_expansion'),
REQUEST('IndexToStore', 'source.request.index_to_store'),
]