mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-27 14:34:58 +00:00
Support iteration over constant instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12645 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c6b0fb39cb
commit
72e606e2bd
@ -19,7 +19,7 @@
|
||||
#include "llvm/DerivedTypes.h"
|
||||
|
||||
namespace llvm {
|
||||
template<typename ItTy = User::op_iterator>
|
||||
template<typename ItTy = User::const_op_iterator>
|
||||
class generic_gep_type_iterator
|
||||
: public forward_iterator<const Type *, ptrdiff_t> {
|
||||
typedef forward_iterator<const Type*, ptrdiff_t> super;
|
||||
@ -76,18 +76,18 @@ namespace llvm {
|
||||
|
||||
typedef generic_gep_type_iterator<> gep_type_iterator;
|
||||
|
||||
inline gep_type_iterator gep_type_begin(User *GEP) {
|
||||
inline gep_type_iterator gep_type_begin(const User *GEP) {
|
||||
return gep_type_iterator::begin(GEP->getOperand(0)->getType(),
|
||||
GEP->op_begin()+1);
|
||||
}
|
||||
inline gep_type_iterator gep_type_end(User *GEP) {
|
||||
inline gep_type_iterator gep_type_end(const User *GEP) {
|
||||
return gep_type_iterator::end(GEP->op_end());
|
||||
}
|
||||
inline gep_type_iterator gep_type_begin(User &GEP) {
|
||||
inline gep_type_iterator gep_type_begin(const User &GEP) {
|
||||
return gep_type_iterator::begin(GEP.getOperand(0)->getType(),
|
||||
GEP.op_begin()+1);
|
||||
}
|
||||
inline gep_type_iterator gep_type_end(User &GEP) {
|
||||
inline gep_type_iterator gep_type_end(const User &GEP) {
|
||||
return gep_type_iterator::end(GEP.op_end());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user