diff options
author | ed <ed@FreeBSD.org> | 2009-06-02 17:58:47 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-06-02 17:58:47 +0000 |
commit | f27e5a09a0d815b8a4814152954ff87dadfdefc0 (patch) | |
tree | ce7d964cbb5e39695b71481698f10cb099c23d4a /lib/Driver/Job.cpp | |
download | FreeBSD-src-f27e5a09a0d815b8a4814152954ff87dadfdefc0.zip FreeBSD-src-f27e5a09a0d815b8a4814152954ff87dadfdefc0.tar.gz |
Import Clang, at r72732.
Diffstat (limited to 'lib/Driver/Job.cpp')
-rw-r--r-- | lib/Driver/Job.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/Driver/Job.cpp b/lib/Driver/Job.cpp new file mode 100644 index 0000000..222cf15 --- /dev/null +++ b/lib/Driver/Job.cpp @@ -0,0 +1,31 @@ +//===--- Job.cpp - Command to Execute -----------------------------------*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "clang/Driver/Job.h" + +#include <cassert> +using namespace clang::driver; + +Job::~Job() {} + +Command::Command(const char *_Executable, const ArgStringList &_Arguments) + : Job(CommandClass), Executable(_Executable), Arguments(_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); +} + |