@@ -860,7 +860,7 @@ namespace driver {
860
860
computeFirstRoundCompileJobsForIncrementalCompilation ();
861
861
862
862
for (const Job *Cmd : Comp.getJobs ()) {
863
- if (Cmd->getFirstSwiftPrimaryInput (). empty ( ) ||
863
+ if (!isa<IncrementalJobAction>( Cmd->getSource () ) ||
864
864
compileJobsToSchedule.count (Cmd)) {
865
865
scheduleCommandIfNecessaryAndPossible (Cmd);
866
866
noteBuilding (Cmd, /* willBeBuilding*/ true , /* isTentative=*/ false ,
@@ -899,20 +899,22 @@ namespace driver {
899
899
CommandSet
900
900
computeDependenciesAndGetNeededCompileJobs (const bool forRanges) {
901
901
auto getEveryCompileJob = [&] {
902
- CommandSet everyCompileJob ;
902
+ CommandSet everyIncrementalJob ;
903
903
for (const Job *Cmd : Comp.getJobs ()) {
904
- if (! Cmd->getFirstSwiftPrimaryInput (). empty ( ))
905
- everyCompileJob .insert (Cmd);
904
+ if (isa<IncrementalJobAction>( Cmd->getSource () ))
905
+ everyIncrementalJob .insert (Cmd);
906
906
}
907
- return everyCompileJob ;
907
+ return everyIncrementalJob ;
908
908
};
909
909
910
910
CommandSet jobsToSchedule;
911
911
CommandSet initialCascadingCommands;
912
912
for (const Job *cmd : Comp.getJobs ()) {
913
- const StringRef primary = cmd->getFirstSwiftPrimaryInput ();
914
- if (primary.empty ())
915
- continue ; // not Compile
913
+ // Skip jobs that have no associated incremental info.
914
+ if (!isa<IncrementalJobAction>(cmd->getSource ())) {
915
+ continue ;
916
+ }
917
+
916
918
const Optional<std::pair<bool , bool >> shouldSchedAndIsCascading =
917
919
computeShouldInitiallyScheduleJobAndDependendents (cmd, forRanges);
918
920
if (!shouldSchedAndIsCascading)
0 commit comments