1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

IR: Expose Module::rbegin() and rend()

A follow-up commit for PR5680 needs to visit functions in reverse order.
Expose iterators to allow that.

llvm-svn: 214121
This commit is contained in:
Duncan P. N. Exon Smith 2014-07-28 21:09:32 +00:00
parent 6021790b64
commit 82508c7202

View File

@ -137,6 +137,11 @@ public:
/// The Function constant iterator
typedef FunctionListType::const_iterator const_iterator;
/// The Function reverse iterator.
typedef FunctionListType::reverse_iterator reverse_iterator;
/// The Function constant reverse iterator.
typedef FunctionListType::const_reverse_iterator const_reverse_iterator;
/// The Global Alias iterators.
typedef AliasListType::iterator alias_iterator;
/// The Global Alias constant iterator
@ -546,6 +551,10 @@ public:
const_iterator begin() const { return FunctionList.begin(); }
iterator end () { return FunctionList.end(); }
const_iterator end () const { return FunctionList.end(); }
reverse_iterator rbegin() { return FunctionList.rbegin(); }
const_reverse_iterator rbegin() const{ return FunctionList.rbegin(); }
reverse_iterator rend() { return FunctionList.rend(); }
const_reverse_iterator rend() const { return FunctionList.rend(); }
size_t size() const { return FunctionList.size(); }
bool empty() const { return FunctionList.empty(); }