aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Job.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Driver/Job.cpp')
-rw-r--r--lib/Driver/Job.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Driver/Job.cpp b/lib/Driver/Job.cpp
index 1bd123e220ec..bfeb41a94299 100644
--- a/lib/Driver/Job.cpp
+++ b/lib/Driver/Job.cpp
@@ -23,8 +23,18 @@ Command::Command(const Action &_Source, const Tool &_Creator,
PipedJob::PipedJob() : Job(PipedJobClass) {}
+PipedJob::~PipedJob() {
+ for (iterator it = begin(), ie = end(); it != ie; ++it)
+ delete *it;
+}
+
JobList::JobList() : Job(JobListClass) {}
+JobList::~JobList() {
+ for (iterator it = begin(), ie = end(); it != ie; ++it)
+ delete *it;
+}
+
void Job::addCommand(Command *C) {
if (PipedJob *PJ = dyn_cast<PipedJob>(this))
PJ->addCommand(C);