mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Implement frontend parseable-output batch job quasi-PID assignment.
Starting at a crude -1000, each invocation primary input will get its own unique quasi-Pid. Invocations with only one primary (non-batch) will get a real OS Pid. The selection of the constant starting point matches what the driver does when outputting its parseable output.
This commit is contained in:
@@ -2073,9 +2073,8 @@ int swift::performFrontend(ArrayRef<const char *> Args,
|
||||
}
|
||||
|
||||
if (Invocation.getFrontendOptions().FrontendParseableOutput) {
|
||||
parseable_output::emitBeganMessage(
|
||||
llvm::errs(), Invocation, Args, llvm::sys::ProcessInfo::InvalidPid,
|
||||
sys::TaskProcessInformation(getpid()));
|
||||
parseable_output::emitBeganMessage(llvm::errs(), Invocation, Args,
|
||||
getpid());
|
||||
}
|
||||
|
||||
int ReturnValue = 0;
|
||||
@@ -2097,9 +2096,8 @@ int swift::performFrontend(ArrayRef<const char *> Args,
|
||||
StatsReporter->noteCurrentProcessExitStatus(r);
|
||||
|
||||
if (Invocation.getFrontendOptions().FrontendParseableOutput) {
|
||||
parseable_output::emitFinishedMessage(
|
||||
llvm::errs(), Invocation, llvm::sys::ProcessInfo::InvalidPid, r,
|
||||
FileSpecificDiagnostics, sys::TaskProcessInformation(getpid()));
|
||||
parseable_output::emitFinishedMessage(llvm::errs(), Invocation, r,
|
||||
FileSpecificDiagnostics, getpid());
|
||||
}
|
||||
|
||||
return r;
|
||||
|
||||
Reference in New Issue
Block a user