Skip to content

Commit

Permalink
[driver] Fixed a bug in DummyTaskQueue where it would not generate un…
Browse files Browse the repository at this point in the history
…ique ProcessIds.

Since DummyTaskQueue does not actually execute, it keeps a counter of
ProcessIds. This previously was a local variable; it is now static since
multiple instances of DummyTaskQueue may be used, depending on the requested
commands.

No tests for this yet, but this will be required to properly test parseable
output.

Swift SVN r20849
  • Loading branch information
cwakamo committed Jul 31, 2014
1 parent 6cf3021 commit 93f7f2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Basic/TaskQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ void DummyTaskQueue::addTask(const char *ExecPath, ArrayRef<const char *> Args,
bool DummyTaskQueue::execute(TaskQueue::TaskBeganCallback Began,
TaskQueue::TaskFinishedCallback Finished,
TaskQueue::TaskSignalledCallback Signalled) {
typedef std::pair<pid_t, std::unique_ptr<DummyTask>> PidTaskPair;
typedef std::pair<ProcessId, std::unique_ptr<DummyTask>> PidTaskPair;
std::queue<PidTaskPair> ExecutingTasks;

bool SubtaskFailed = false;

pid_t Pid = 0;
static ProcessId Pid = 0;

unsigned MaxNumberOfParallelTasks = getNumberOfParallelTasks();

Expand Down

0 comments on commit 93f7f2a

Please sign in to comment.