[cfe-commits] r110014 - in /cfe/trunk: include/clang/Driver/Job.h lib/Driver/Compilation.cpp lib/Driver/Job.cpp
Daniel Dunbar
daniel at zuster.org
Sun Aug 1 19:38:25 PDT 2010
Author: ddunbar
Date: Sun Aug 1 21:38:25 2010
New Revision: 110014
URL: http://llvm.org/viewvc/llvm-project?rev=110014&view=rev
Log:
Driver: Eliminate PipedJob, which is now unused.
Modified:
cfe/trunk/include/clang/Driver/Job.h
cfe/trunk/lib/Driver/Compilation.cpp
cfe/trunk/lib/Driver/Job.cpp
Modified: cfe/trunk/include/clang/Driver/Job.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Job.h?rev=110014&r1=110013&r2=110014&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Job.h (original)
+++ cfe/trunk/include/clang/Driver/Job.h Sun Aug 1 21:38:25 2010
@@ -29,7 +29,6 @@
public:
enum JobClass {
CommandClass,
- PipedJobClass,
JobListClass
};
@@ -86,39 +85,6 @@
static bool classof(const Command *) { return true; }
};
- /// PipedJob - A list of Commands which should be executed together
- /// with their standard inputs and outputs connected.
-class PipedJob : public Job {
-public:
- typedef llvm::SmallVector<Command*, 4> list_type;
- typedef list_type::size_type size_type;
- typedef list_type::iterator iterator;
- typedef list_type::const_iterator const_iterator;
-
-private:
- list_type Commands;
-
-public:
- PipedJob();
- virtual ~PipedJob();
-
- /// Add a command to the piped job (taking ownership).
- void addCommand(Command *C) { Commands.push_back(C); }
-
- const list_type &getCommands() const { return Commands; }
-
- size_type size() const { return Commands.size(); }
- iterator begin() { return Commands.begin(); }
- const_iterator begin() const { return Commands.begin(); }
- iterator end() { return Commands.end(); }
- const_iterator end() const { return Commands.end(); }
-
- static bool classof(const Job *J) {
- return J->getKind() == PipedJobClass;
- }
- static bool classof(const PipedJob *) { return true; }
-};
-
/// JobList - A sequence of jobs to perform.
class JobList : public Job {
public:
Modified: cfe/trunk/lib/Driver/Compilation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Compilation.cpp?rev=110014&r1=110013&r2=110014&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Compilation.cpp (original)
+++ cfe/trunk/lib/Driver/Compilation.cpp Sun Aug 1 21:38:25 2010
@@ -83,10 +83,6 @@
OS << '"';
}
OS << Terminator;
- } else if (const PipedJob *PJ = dyn_cast<PipedJob>(&J)) {
- for (PipedJob::const_iterator
- it = PJ->begin(), ie = PJ->end(); it != ie; ++it)
- PrintJob(OS, **it, (it + 1 != PJ->end()) ? " |\n" : "\n", Quote);
} else {
const JobList *Jobs = cast<JobList>(&J);
for (JobList::const_iterator
@@ -190,14 +186,6 @@
const Command *&FailingCommand) const {
if (const Command *C = dyn_cast<Command>(&J)) {
return ExecuteCommand(*C, FailingCommand);
- } else if (const PipedJob *PJ = dyn_cast<PipedJob>(&J)) {
- // Piped commands with a single job are easy.
- if (PJ->size() == 1)
- return ExecuteCommand(**PJ->begin(), FailingCommand);
-
- FailingCommand = *PJ->begin();
- getDriver().Diag(clang::diag::err_drv_unsupported_opt) << "-pipe";
- return 1;
} else {
const JobList *Jobs = cast<JobList>(&J);
for (JobList::const_iterator
Modified: cfe/trunk/lib/Driver/Job.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Job.cpp?rev=110014&r1=110013&r2=110014&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Job.cpp (original)
+++ cfe/trunk/lib/Driver/Job.cpp Sun Aug 1 21:38:25 2010
@@ -21,13 +21,6 @@
{
}
-PipedJob::PipedJob() : Job(PipedJobClass) {}
-
-PipedJob::~PipedJob() {
- for (iterator it = begin(), ie = end(); it != ie; ++it)
- delete *it;
-}
-
JobList::JobList() : Job(JobListClass) {}
JobList::~JobList() {
@@ -36,9 +29,6 @@
}
void Job::addCommand(Command *C) {
- if (PipedJob *PJ = dyn_cast<PipedJob>(this))
- PJ->addCommand(C);
- else
- cast<JobList>(this)->addJob(C);
+ cast<JobList>(this)->addJob(C);
}
More information about the cfe-commits
mailing list