[sourcekitd] Change compile notifications to pass a single args string

... instead of an array of compiler arguments. This is good enough
for seeing what's going on, and it saves significant time for long
argument strings, because it doesn't create and destroy so many
xpc strings, and more of the string copying that happens is on a large
contiguous string instead of many small strings.

rdar://39538847
This commit is contained in:
Ben Langmuir
2018-04-18 13:34:19 -07:00
parent 1d66f0ab50
commit 23ab43c941
7 changed files with 30 additions and 14 deletions

View File

@@ -795,8 +795,8 @@ ASTUnitRef ASTProducer::createASTUnit(SwiftASTManager::Implementation &MgrImpl,
trace::TracedOperation TracedOp(trace::OperationKind::PerformSema);
trace::SwiftInvocation TraceInfo;
if (TracedOp.enabled()) {
TraceInfo.Args.PrimaryFile = InvokRef->Impl.Opts.PrimaryFile;
TraceInfo.Args.Args = InvokRef->Impl.Opts.Args;
trace::initTraceInfo(TraceInfo, InvokRef->Impl.Opts.PrimaryFile,
InvokRef->Impl.Opts.Args);
}
ASTUnitRef ASTRef = new ASTUnit(++ASTUnitGeneration, MgrImpl.Stats);