File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -876,8 +876,8 @@ class StaticLibJobAction : public JobAction {
876
876
// / - No change of toolchain, boundarch and offloading kind should occur
877
877
// / within the sub-region;
878
878
// / - No job should produce multiple outputs;
879
- // / - Results of action within the sub-region should not be used the wrapped
880
- // / region.
879
+ // / - Results of action within the sub-region should not be used ouside the
880
+ // / wrapped region.
881
881
// / Note: this doesn't bind to a tool directly and this need special casing
882
882
// / anyhow. Hence why this is an Action and not a JobAction, even if there is a
883
883
// / command behind.
Original file line number Diff line number Diff line change @@ -319,7 +319,8 @@ class JobList {
319
319
// / Clear the job list.
320
320
void clear ();
321
321
322
- list_type &getJobs () { return Jobs; }
322
+ // / Return a mutable list of Jobs for llvm-foreach wrapping.
323
+ list_type &getJobsForOverride () { return Jobs; }
323
324
const list_type &getJobs () const { return Jobs; }
324
325
325
326
bool empty () const { return Jobs.empty (); }
Original file line number Diff line number Diff line change @@ -6369,13 +6369,13 @@ InputInfo Driver::BuildJobsForActionNoCache(
6369
6369
/* AtTopLevel=*/ false , MultipleArchs, LinkingOutput,
6370
6370
CachedResults, TargetDeviceOffloadKind);
6371
6371
6372
- auto begin = C.getJobs ().getJobs ().begin () + OffsetIdx;
6373
- auto end = C.getJobs ().getJobs ().end ();
6372
+ auto begin = C.getJobs ().getJobsForOverride ().begin () + OffsetIdx;
6373
+ auto end = C.getJobs ().getJobsForOverride ().end ();
6374
6374
6375
6375
// Steal the commands.
6376
6376
llvm::SmallVector<std::unique_ptr<Command>, 4 > JobsToWrap (
6377
6377
std::make_move_iterator (begin), std::make_move_iterator (end));
6378
- C.getJobs ().getJobs ().erase (begin, end);
6378
+ C.getJobs ().getJobsForOverride ().erase (begin, end);
6379
6379
6380
6380
InputInfo ActionResult;
6381
6381
for (std::unique_ptr<Command> Cmd :
You can’t perform that action at this time.
0 commit comments