[cfe-commits] r67176 - /cfe/trunk/include/clang/Driver/Job.h

Daniel Dunbar daniel at zuster.org
Tue Mar 17 23:48:39 PDT 2009


Author: ddunbar
Date: Wed Mar 18 01:48:39 2009
New Revision: 67176

URL: http://llvm.org/viewvc/llvm-project?rev=67176&view=rev
Log:
Driver: Add forwarding methods to underlying list for PipedJob and
JobList.

Modified:
    cfe/trunk/include/clang/Driver/Job.h

Modified: cfe/trunk/include/clang/Driver/Job.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Job.h?rev=67176&r1=67175&r2=67176&view=diff

==============================================================================
--- cfe/trunk/include/clang/Driver/Job.h (original)
+++ cfe/trunk/include/clang/Driver/Job.h Wed Mar 18 01:48:39 2009
@@ -71,6 +71,9 @@
 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;
@@ -81,6 +84,12 @@
   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; 
@@ -92,6 +101,9 @@
 class JobList : public Job {
 public:
   typedef llvm::SmallVector<Job*, 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 Jobs;
@@ -103,6 +115,12 @@
 
   const list_type &getJobs() const { return Jobs; }
 
+  size_type size() const { return Jobs.size(); }
+  iterator begin() { return Jobs.begin(); }
+  const_iterator begin() const { return Jobs.begin(); }
+  iterator end() { return Jobs.end(); }
+  const_iterator end() const { return Jobs.end(); }
+  
   static bool classof(const Job *J) { 
     return J->getKind() == JobListClass; 
   }





More information about the cfe-commits mailing list