diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-03-11 18:04:49 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-03-11 18:04:49 +0000 |
commit | 9d44023453094832ada2770941e9e4c96ce0e75e (patch) | |
tree | cca4f01787533d995f043cf0f07d50b55851fd68 /lib | |
parent | f2b552e60d4701a0f8aa99ee669fd803fe5e888c (diff) |
Driver: Free jobs in JobList and PipedJob instances.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98261 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Driver/Job.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Driver/Job.cpp b/lib/Driver/Job.cpp index 1bd123e220..bfeb41a942 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); |