From: Daniel Dunbar Date: Wed, 18 Mar 2009 06:48:39 +0000 (+0000) Subject: Driver: Add forwarding methods to underlying list for PipedJob and X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cfcb96f610d6354234e8c33f3a25e340f6cd3a80;p=clang Driver: Add forwarding methods to underlying list for PipedJob and JobList. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67176 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/Job.h b/include/clang/Driver/Job.h index 8a7aa1aa99..d8737393aa 100644 --- a/include/clang/Driver/Job.h +++ b/include/clang/Driver/Job.h @@ -71,6 +71,9 @@ public: 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; @@ -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 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; }