|
1 | | -//===--- ParseableOutput.h - Helpers for parseable output -------*- C++ -*-===// |
| 1 | +//===----- ParseableOutput.h - Helpers for parseable output ------- C++ -*-===// |
2 | 2 | // |
3 | 3 | // This source file is part of the Swift.org open source project |
4 | 4 | // |
5 | | -// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors |
| 5 | +// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors |
6 | 6 | // Licensed under Apache License v2.0 with Runtime Library Exception |
7 | 7 | // |
8 | 8 | // See https://swift.org/LICENSE.txt for license information |
|
11 | 11 | //===----------------------------------------------------------------------===// |
12 | 12 | /// |
13 | 13 | /// \file |
14 | | -/// Helpers for emitting the driver's parseable output. |
| 14 | +/// Helpers for emitting the compiler's parseable output. |
15 | 15 | /// |
16 | 16 | //===----------------------------------------------------------------------===// |
17 | 17 |
|
18 | | -#ifndef SWIFT_DRIVER_PARSEABLEOUTPUT_H |
19 | | -#define SWIFT_DRIVER_PARSEABLEOUTPUT_H |
| 18 | +#ifndef SWIFT_PARSEABLEOUTPUT_H |
| 19 | +#define SWIFT_PARSEABLEOUTPUT_H |
20 | 20 |
|
21 | 21 | #include "swift/Basic/LLVM.h" |
22 | 22 | #include "swift/Basic/TaskQueue.h" |
| 23 | +#include "swift/Frontend/Frontend.h" |
| 24 | +#include "swift/Driver/Job.h" |
23 | 25 |
|
24 | 26 | namespace swift { |
25 | | -namespace driver { |
26 | 27 |
|
27 | | -class Job; |
28 | 28 |
|
29 | 29 | namespace parseable_output { |
30 | 30 |
|
31 | | -/// Emits a "began" message to the given stream. |
32 | | -void emitBeganMessage(raw_ostream &os, const Job &Cmd, int64_t Pid, |
| 31 | +/// Emits a "began" message to the given stream, corresponding to a Driver Job. |
| 32 | +void emitBeganMessage(raw_ostream &os, const driver::Job &Cmd, int64_t Pid, |
| 33 | + sys::TaskProcessInformation ProcInfo); |
| 34 | + |
| 35 | +/// Emits a "began" message to the given stream, corresponding to a given Frontend |
| 36 | +/// Compiler Invocation. |
| 37 | +void emitBeganMessage(raw_ostream &os, |
| 38 | + const CompilerInvocation &Invocation, |
| 39 | + ArrayRef<const char *> Args, |
| 40 | + int64_t Pid, |
33 | 41 | sys::TaskProcessInformation ProcInfo); |
34 | 42 |
|
35 | 43 | /// Emits a "finished" message to the given stream. |
36 | | -void emitFinishedMessage(raw_ostream &os, const Job &Cmd, int64_t Pid, |
| 44 | +void emitFinishedMessage(raw_ostream &os, const driver::Job &Cmd, int64_t Pid, |
37 | 45 | int ExitStatus, StringRef Output, |
38 | 46 | sys::TaskProcessInformation ProcInfo); |
39 | 47 |
|
40 | 48 | /// Emits a "signalled" message to the given stream. |
41 | | -void emitSignalledMessage(raw_ostream &os, const Job &Cmd, int64_t Pid, |
| 49 | +void emitSignalledMessage(raw_ostream &os, const driver::Job &Cmd, int64_t Pid, |
42 | 50 | StringRef ErrorMsg, StringRef Output, |
43 | 51 | Optional<int> Signal, |
44 | 52 | sys::TaskProcessInformation ProcInfo); |
45 | 53 |
|
46 | 54 | /// Emits a "skipped" message to the given stream. |
47 | | -void emitSkippedMessage(raw_ostream &os, const Job &Cmd); |
| 55 | +void emitSkippedMessage(raw_ostream &os, const driver::Job &Cmd); |
48 | 56 |
|
49 | 57 | } // end namespace parseable_output |
50 | | -} // end namespace driver |
51 | 58 | } // end namespace swift |
52 | 59 |
|
53 | 60 | #endif |
0 commit comments