@@ -210,6 +210,16 @@ class Compilation {
210
210
// / faster rebuilds.
211
211
const bool EnableExperimentalDependencies;
212
212
213
+ // / Helpful for debugging, but slows down the driver. So, only turn on when
214
+ // / needed.
215
+ const bool VerifyExperimentalDependencyGraphAfterEveryImport;
216
+ // / Helpful for debugging, but slows down the driver. So, only turn on when
217
+ // / needed.
218
+ const bool EmitExperimentalDependencyDotFileAfterEveryImport;
219
+
220
+ // / Experiment with inter-file dependencies
221
+ const bool ExperimentalDependenciesIncludeIntrafileOnes;
222
+
213
223
template <typename T>
214
224
static T *unwrap (const std::unique_ptr<T> &p) {
215
225
return p.get ();
@@ -220,6 +230,7 @@ class Compilation {
220
230
ArrayRefView<std::unique_ptr<T>, T *, Compilation::unwrap<T>>;
221
231
222
232
public:
233
+ // clang-format off
223
234
Compilation (DiagnosticEngine &Diags, const ToolChain &TC,
224
235
OutputInfo const &OI,
225
236
OutputLevel Level,
@@ -239,7 +250,11 @@ class Compilation {
239
250
bool SaveTemps = false ,
240
251
bool ShowDriverTimeCompilation = false ,
241
252
std::unique_ptr<UnifiedStatsReporter> Stats = nullptr ,
242
- bool EnableExperimentalDependencies = false );
253
+ bool EnableExperimentalDependencies = false ,
254
+ bool VerifyExperimentalDependencyGraphAfterEveryImport = false ,
255
+ bool EmitExperimentalDependencyDotFileAfterEveryImport = false ,
256
+ bool ExperimentalDependenciesIncludeIntrafileOnes = false );
257
+ // clang-format on
243
258
~Compilation ();
244
259
245
260
ToolChain const &getToolChain () const {
@@ -298,6 +313,18 @@ class Compilation {
298
313
return EnableExperimentalDependencies;
299
314
}
300
315
316
+ bool getVerifyExperimentalDependencyGraphAfterEveryImport () const {
317
+ return VerifyExperimentalDependencyGraphAfterEveryImport;
318
+ }
319
+
320
+ bool getEmitExperimentalDependencyDotFileAfterEveryImport () const {
321
+ return EmitExperimentalDependencyDotFileAfterEveryImport;
322
+ }
323
+
324
+ bool getExperimentalDependenciesIncludeIntrafileOnes () const {
325
+ return ExperimentalDependenciesIncludeIntrafileOnes;
326
+ }
327
+
301
328
bool getBatchModeEnabled () const {
302
329
return EnableBatchMode;
303
330
}
@@ -312,7 +339,7 @@ class Compilation {
312
339
bool getShowIncrementalBuildDecisions () const {
313
340
return ShowIncrementalBuildDecisions;
314
341
}
315
- void setShowsIncrementalBuildDecisions (bool value = true ) {
342
+ void setShowIncrementalBuildDecisions (bool value = true ) {
316
343
ShowIncrementalBuildDecisions = value;
317
344
}
318
345
@@ -335,6 +362,12 @@ class Compilation {
335
362
return Stats.get ();
336
363
}
337
364
365
+ // / True if extra work has to be done when tracing through the dependency
366
+ // / graph, either in order to print dependencies or to collect statistics.
367
+ bool getTraceDependencies () const {
368
+ return getShowIncrementalBuildDecisions () || getStatsReporter ();
369
+ }
370
+
338
371
OutputLevel getOutputLevel () const {
339
372
return Level;
340
373
}
0 commit comments