• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "llvm/ADT/STLExtras.h"
12 #include <cassert>
13 using namespace clang::driver;
14 
~Job()15 Job::~Job() {}
16 
anchor()17 void Command::anchor() {}
18 
Command(const Action & _Source,const Tool & _Creator,const char * _Executable,const llvm::opt::ArgStringList & _Arguments)19 Command::Command(const Action &_Source, const Tool &_Creator,
20                  const char *_Executable,
21                  const llvm::opt::ArgStringList &_Arguments)
22     : Job(CommandClass), Source(_Source), Creator(_Creator),
23       Executable(_Executable), Arguments(_Arguments) {}
24 
JobList()25 JobList::JobList() : Job(JobListClass) {}
26 
~JobList()27 JobList::~JobList() {
28   for (iterator it = begin(), ie = end(); it != ie; ++it)
29     delete *it;
30 }
31 
clear()32 void JobList::clear() {
33   DeleteContainerPointers(Jobs);
34 }
35 
addCommand(Command * C)36 void Job::addCommand(Command *C) {
37   cast<JobList>(this)->addJob(C);
38 }
39 
40