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"
11 #include "llvm/ADT/STLExtras.h"
13 using namespace clang::driver;
17 void Command::anchor() {}
19 Command::Command(const Action &_Source, const Tool &_Creator,
20 const char *_Executable, const ArgStringList &_Arguments)
21 : Job(CommandClass), Source(_Source), Creator(_Creator),
22 Executable(_Executable), Arguments(_Arguments)
26 JobList::JobList() : Job(JobListClass) {}
29 for (iterator it = begin(), ie = end(); it != ie; ++it)
33 void JobList::clear() {
34 DeleteContainerPointers(Jobs);
37 void Job::addCommand(Command *C) {
38 cast<JobList>(this)->addJob(C);