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> 13using namespace clang::driver; 14 15Job::~Job() {} 16 17void Command::anchor() {} 18 19Command::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) 23{ 24} 25 26JobList::JobList() : Job(JobListClass) {} 27 28JobList::~JobList() { 29 for (iterator it = begin(), ie = end(); it != ie; ++it) 30 delete *it; 31} 32 33void JobList::clear() { 34 DeleteContainerPointers(Jobs); 35} 36 37void Job::addCommand(Command *C) { 38 cast<JobList>(this)->addJob(C); 39} 40 41