summaryrefslogtreecommitdiffstats
path: root/lld/include
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2015-04-08 23:12:48 +0000
committerRui Ueyama <ruiu@google.com>2015-04-08 23:12:48 +0000
commit2effbd6b682526dd2679f87eb55dabadca25fa54 (patch)
tree8eb058c8734ef22585847da06a3d1cffaecffdd0 /lld/include
parentde40bd4cf9faa1c63e495ad2ffe2883a76c727c7 (diff)
downloadbcm5719-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.h20
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;
OpenPOWER on IntegriCloud