diff --git a/include/clang/Driver/Job.h b/include/clang/Driver/Job.h index 5a789fbb8f..d2767d1b87 100644 --- a/include/clang/Driver/Job.h +++ b/include/clang/Driver/Job.h @@ -29,7 +29,6 @@ class Job { public: enum JobClass { CommandClass, - PipedJobClass, JobListClass }; @@ -86,39 +85,6 @@ public: 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 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: diff --git a/lib/Driver/Compilation.cpp b/lib/Driver/Compilation.cpp index 282e9fe82e..c059afd454 100644 --- a/lib/Driver/Compilation.cpp +++ b/lib/Driver/Compilation.cpp @@ -83,10 +83,6 @@ void Compilation::PrintJob(llvm::raw_ostream &OS, const Job &J, OS << '"'; } OS << Terminator; - } else if (const PipedJob *PJ = dyn_cast(&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(&J); for (JobList::const_iterator @@ -190,14 +186,6 @@ int Compilation::ExecuteJob(const Job &J, const Command *&FailingCommand) const { if (const Command *C = dyn_cast(&J)) { return ExecuteCommand(*C, FailingCommand); - } else if (const PipedJob *PJ = dyn_cast(&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(&J); for (JobList::const_iterator diff --git a/lib/Driver/Job.cpp b/lib/Driver/Job.cpp index bfeb41a942..fa7d060772 100644 --- a/lib/Driver/Job.cpp +++ b/lib/Driver/Job.cpp @@ -21,13 +21,6 @@ Command::Command(const Action &_Source, const Tool &_Creator, { } -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 @@ JobList::~JobList() { } void Job::addCommand(Command *C) { - if (PipedJob *PJ = dyn_cast(this)) - PJ->addCommand(C); - else - cast(this)->addJob(C); + cast(this)->addJob(C); }