Reid Kleckner 898229ab4b [Driver] Refactor clang driver to use LLVM's Option library
The big changes are:
- Deleting Driver/(Arg|Opt)*
- Rewriting includes to llvm/Option/ and re-sorting
- 'using namespace llvm::opt' in clang::driver
- Fixing the autoconf build by adding option everywhere

As discussed in the review, this change includes using directives in
header files.  I'll make follow up changes to remove those in favor of
name specifiers.

Reviewers: espindola

Differential Revision: http://llvm-reviews.chandlerc.com/D975

llvm-svn: 183989
2013-06-14 17:17:23 +00:00

40 lines
1.0 KiB
C++

//===--- 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 "llvm/ADT/STLExtras.h"
#include <cassert>
using namespace clang::driver;
Job::~Job() {}
void Command::anchor() {}
Command::Command(const Action &_Source, const Tool &_Creator,
const char *_Executable,
const llvm::opt::ArgStringList &_Arguments)
: Job(CommandClass), Source(_Source), Creator(_Creator),
Executable(_Executable), Arguments(_Arguments) {}
JobList::JobList() : Job(JobListClass) {}
JobList::~JobList() {
for (iterator it = begin(), ie = end(); it != ie; ++it)
delete *it;
}
void JobList::clear() {
DeleteContainerPointers(Jobs);
}
void Job::addCommand(Command *C) {
cast<JobList>(this)->addJob(C);
}