1 //===--- Job.cpp - Command to Execute -----------------------------------*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "clang/Driver/Job.h"
13 using namespace clang::driver
;
17 Command::Command(const Action
&_Source
, const char *_Executable
,
18 const ArgStringList
&_Arguments
)
19 : Job(CommandClass
), Source(_Source
), Executable(_Executable
),
20 Arguments(_Arguments
) {
23 PipedJob::PipedJob() : Job(PipedJobClass
) {}
25 JobList::JobList() : Job(JobListClass
) {}
27 void Job::addCommand(Command
*C
) {
28 if (PipedJob
*PJ
= dyn_cast
<PipedJob
>(this))
31 cast
<JobList
>(this)->addJob(C
);