opnsense-src/lib/Driver/Job.cpp

43 lines
1 KiB
C++
Raw Normal View History

//===--- Job.cpp - Command to Execute -------------------------------------===//
2009-06-02 13:58:47 -04:00
//
// 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 "llvm/ADT/STLExtras.h"
2009-06-02 13:58:47 -04:00
#include <cassert>
using namespace clang::driver;
Job::~Job() {}
void Command::anchor() {}
2009-12-15 13:49:47 -05:00
Command::Command(const Action &_Source, const Tool &_Creator,
const char *_Executable, const ArgStringList &_Arguments)
: Job(CommandClass), Source(_Source), Creator(_Creator),
Executable(_Executable), Arguments(_Arguments)
{
2009-06-02 13:58:47 -04:00
}
JobList::JobList() : Job(JobListClass) {}
2010-03-16 12:52:15 -04:00
JobList::~JobList() {
for (iterator it = begin(), ie = end(); it != ie; ++it)
delete *it;
}
void JobList::clear() {
DeleteContainerPointers(Jobs);
}
2009-06-02 13:58:47 -04:00
void Job::addCommand(Command *C) {
cast<JobList>(this)->addJob(C);
2009-06-02 13:58:47 -04:00
}
2009-10-14 14:03:49 -04:00