@@ -127,7 +127,7 @@ class JobAction : public Action {
127
127
}
128
128
};
129
129
130
- class CompileJobAction : public JobAction {
130
+ class IncrementalJobAction : public JobAction {
131
131
public:
132
132
struct InputInfo {
133
133
enum Status {
@@ -136,6 +136,8 @@ class CompileJobAction : public JobAction {
136
136
NeedsNonCascadingBuild,
137
137
NewlyAdded
138
138
};
139
+
140
+ public:
139
141
Status status = UpToDate;
140
142
llvm::sys::TimePoint<> previousModTime;
141
143
@@ -153,18 +155,32 @@ class CompileJobAction : public JobAction {
153
155
InputInfo inputInfo;
154
156
155
157
public:
156
- CompileJobAction (file_types::ID OutputType)
157
- : JobAction(Action::Kind::CompileJob, None, OutputType),
158
- inputInfo () {}
159
-
160
- CompileJobAction (Action *Input, file_types::ID OutputType, InputInfo info)
161
- : JobAction(Action::Kind::CompileJob, Input, OutputType),
162
- inputInfo(info) {}
158
+ IncrementalJobAction (Kind Kind, ArrayRef<const Action *> Inputs,
159
+ file_types::ID Type, InputInfo info)
160
+ : JobAction(Kind, Inputs, Type), inputInfo(info) {}
163
161
162
+ public:
164
163
InputInfo getInputInfo () const {
165
164
return inputInfo;
166
165
}
167
166
167
+ public:
168
+ static bool classof (const Action *A) {
169
+ return A->getKind () == Action::Kind::CompileJob;
170
+ }
171
+ };
172
+
173
+ class CompileJobAction : public IncrementalJobAction {
174
+ private:
175
+ virtual void anchor () override ;
176
+
177
+ public:
178
+ CompileJobAction (file_types::ID OutputType)
179
+ : IncrementalJobAction(Action::Kind::CompileJob, None, OutputType, {}) {}
180
+ CompileJobAction (Action *Input, file_types::ID OutputType, InputInfo info)
181
+ : IncrementalJobAction(Action::Kind::CompileJob, Input, OutputType,
182
+ info) {}
183
+
168
184
static bool classof (const Action *A) {
169
185
return A->getKind () == Action::Kind::CompileJob;
170
186
}
0 commit comments