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.cpp8
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);
+}
+