diff options
| author | Rui Ueyama <ruiu@google.com> | 2015-04-08 23:12:48 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2015-04-08 23:12:48 +0000 |
| commit | 2effbd6b682526dd2679f87eb55dabadca25fa54 (patch) | |
| tree | 8eb058c8734ef22585847da06a3d1cffaecffdd0 /lld/include | |
| parent | de40bd4cf9faa1c63e495ad2ffe2883a76c727c7 (diff) | |
| download | bcm5719-llvm-2effbd6b682526dd2679f87eb55dabadca25fa54.tar.gz bcm5719-llvm-2effbd6b682526dd2679f87eb55dabadca25fa54.zip | |
AtomVector: Reorder member orders to use template alias in AtomRange.
llvm-svn: 234453
Diffstat (limited to 'lld/include')
| -rw-r--r-- | lld/include/lld/Core/File.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/lld/include/lld/Core/File.h b/lld/include/lld/Core/File.h index 1ff0f77b9bb..43e051101e0 100644 --- a/lld/include/lld/Core/File.h +++ b/lld/include/lld/Core/File.h @@ -91,25 +91,23 @@ public: return _allocator; } + /// The type of atom mutable container. + template <typename T> using AtomVector = std::vector<const T *>; + /// The range type for the atoms. It's backed by a std::vector, but hides /// its member functions so that you can only call begin or end. template <typename T> class AtomRange { - typedef std::vector<const T *> VectorT; - public: - AtomRange(std::vector<const T *> v) : _v(v) {} - typename VectorT::const_iterator begin() const { return _v.begin(); } - typename VectorT::const_iterator end() const { return _v.end(); } - typename VectorT::iterator begin() { return _v.begin(); } - typename VectorT::iterator end() { return _v.end(); } + AtomRange(AtomVector<T> v) : _v(v) {} + typename AtomVector<T>::const_iterator begin() const { return _v.begin(); } + typename AtomVector<T>::const_iterator end() const { return _v.end(); } + typename AtomVector<T>::iterator begin() { return _v.begin(); } + typename AtomVector<T>::iterator end() { return _v.end(); } private: - VectorT &_v; + AtomVector<T> &_v; }; - /// The type of atom mutable container. - template <typename T> using AtomVector = std::vector<const T *>; - /// \brief Must be implemented to return the AtomVector object for /// all DefinedAtoms in this File. virtual const AtomVector<DefinedAtom> &defined() const = 0; |

