mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[index/build] Upstream indexing while building changes
This patch upstreams previously AppleInternal changes for indexing while building.
This commit is contained in:
@@ -97,6 +97,12 @@ bool CompilerInstance::setup(const CompilerInvocation &Invok) {
|
||||
if (!Invocation.getFrontendOptions().ModuleDocOutputPath.empty())
|
||||
Invocation.getLangOptions().AttachCommentsToDecls = true;
|
||||
|
||||
// If we are doing index-while-building, configure lexing and parsing to
|
||||
// remember comments.
|
||||
if (!Invocation.getFrontendOptions().IndexStorePath.empty()) {
|
||||
Invocation.getLangOptions().AttachCommentsToDecls = true;
|
||||
}
|
||||
|
||||
Context.reset(new ASTContext(Invocation.getLangOptions(),
|
||||
Invocation.getSearchPathOptions(),
|
||||
SourceMgr, Diagnostics));
|
||||
|
||||
Reference in New Issue
Block a user