[llvm-commits] CVS: llvm/include/llvm/Support/GetElementPtrTypeIterator.h
Chris Lattner
lattner at cs.uiuc.edu
Sun Apr 4 14:47:16 PDT 2004
Changes in directory llvm/include/llvm/Support:
GetElementPtrTypeIterator.h updated: 1.6 -> 1.7
---
Log message:
Support iteration over constant instructions
---
Diffs of the changes: (+5 -5)
Index: llvm/include/llvm/Support/GetElementPtrTypeIterator.h
diff -u llvm/include/llvm/Support/GetElementPtrTypeIterator.h:1.6 llvm/include/llvm/Support/GetElementPtrTypeIterator.h:1.7
--- llvm/include/llvm/Support/GetElementPtrTypeIterator.h:1.6 Sat Apr 3 17:29:11 2004
+++ llvm/include/llvm/Support/GetElementPtrTypeIterator.h Sun Apr 4 14:46:54 2004
@@ -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 @@
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());
}
More information about the llvm-commits
mailing list