]> granicus.if.org Git - clang/commitdiff
Driver: Add forwarding methods to underlying list for PipedJob and
authorDaniel Dunbar <daniel@zuster.org>
Wed, 18 Mar 2009 06:48:39 +0000 (06:48 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 18 Mar 2009 06:48:39 +0000 (06:48 +0000)
JobList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67176 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/Job.h

index 8a7aa1aa995929af1e70a4630fb2790349ef3a4f..d8737393aaaa61bec571cb1710be586f2d299ba8 100644 (file)
@@ -71,6 +71,9 @@ public:
 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 @@ public:
   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 @@ public:
 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 @@ public:
 
   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; 
   }