mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
Add operator[] accessors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@894 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
712ac2b951
commit
c148d4e073
@ -25,7 +25,6 @@
|
||||
//
|
||||
template<class ValueSubclass, class ItemParentType, class SymTabType>
|
||||
class ValueHolder {
|
||||
// TODO: Should I use a deque instead of a vector?
|
||||
vector<ValueSubclass*> ValueList;
|
||||
|
||||
ItemParentType *ItemParent;
|
||||
@ -50,12 +49,18 @@ public:
|
||||
inline SymTabType *getParent() { return Parent; }
|
||||
void setParent(SymTabType *Parent); // Defined in ValueHolderImpl.h
|
||||
|
||||
inline unsigned size() const { return ValueList.size(); }
|
||||
inline bool empty() const { return ValueList.empty(); }
|
||||
inline unsigned size() const { return ValueList.size(); }
|
||||
inline bool empty() const { return ValueList.empty(); }
|
||||
inline const ValueSubclass *front() const { return ValueList.front(); }
|
||||
inline ValueSubclass *front() { return ValueList.front(); }
|
||||
inline const ValueSubclass *back() const { return ValueList.back(); }
|
||||
inline ValueSubclass *back() { return ValueList.back(); }
|
||||
inline const ValueSubclass *back() const { return ValueList.back(); }
|
||||
inline ValueSubclass *back() { return ValueList.back(); }
|
||||
inline const ValueSubclass *operator[](unsigned i) const {
|
||||
return ValueList[i];
|
||||
}
|
||||
inline ValueSubclass *operator[](unsigned i) {
|
||||
return ValueList[i];
|
||||
}
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
// sub-Definition iterator code
|
||||
|
Loading…
Reference in New Issue
Block a user