diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-03-18 07:06:02 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-03-18 07:06:02 +0000 |
commit | 871adcf4e41285e3f4c3b62eaa1b2e05b60b92da (patch) | |
tree | 779a51cca6bd05510c46bdaeb56219ac2725ad16 /lib/Driver/Job.cpp | |
parent | aa469f62f2b3ba6f560ccadfc379f8f4c45e3d51 (diff) |
Driver: ConstructJob also needs to know the destination (where to put
its commands).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67179 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Job.cpp')
-rw-r--r-- | lib/Driver/Job.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Driver/Job.cpp b/lib/Driver/Job.cpp index 1efc38a8e8..222cf15db6 100644 --- a/lib/Driver/Job.cpp +++ b/lib/Driver/Job.cpp @@ -21,3 +21,11 @@ Command::Command(const char *_Executable, const ArgStringList &_Arguments) PipedJob::PipedJob() : Job(PipedJobClass) {} JobList::JobList() : Job(JobListClass) {} + +void Job::addCommand(Command *C) { + if (PipedJob *PJ = dyn_cast<PipedJob>(this)) + PJ->addCommand(C); + else + cast<JobList>(this)->addJob(C); +} + |