]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/Driver/Job.cpp
Import Clang r73340.
[FreeBSD/FreeBSD.git] / lib / Driver / Job.cpp
1 //===--- Job.cpp - Command to Execute -----------------------------------*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #include "clang/Driver/Job.h"
11
12 #include <cassert>
13 using namespace clang::driver;
14
15 Job::~Job() {}
16
17 Command::Command(const char *_Executable, const ArgStringList &_Arguments)
18   : Job(CommandClass), Executable(_Executable), Arguments(_Arguments) {
19 }
20
21 PipedJob::PipedJob() : Job(PipedJobClass) {}
22
23 JobList::JobList() : Job(JobListClass) {}
24
25 void Job::addCommand(Command *C) {
26   if (PipedJob *PJ = dyn_cast<PipedJob>(this))
27     PJ->addCommand(C);
28   else
29     cast<JobList>(this)->addJob(C);
30 }
31