aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-04-04 19:46:54 +0000
committerChris Lattner <sabre@nondot.org>2004-04-04 19:46:54 +0000
commit72e606e2bd76452ac6760ceed258b377cd8862a2 (patch)
tree223f90f49d9d8340c0f532900779f948412bb0d8 /include
parentc6b0fb39cb227c247269a0815961424cd2718d20 (diff)
downloadexternal_llvm-72e606e2bd76452ac6760ceed258b377cd8862a2.zip
external_llvm-72e606e2bd76452ac6760ceed258b377cd8862a2.tar.gz
external_llvm-72e606e2bd76452ac6760ceed258b377cd8862a2.tar.bz2
Support iteration over constant instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12645 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/GetElementPtrTypeIterator.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/llvm/Support/GetElementPtrTypeIterator.h b/include/llvm/Support/GetElementPtrTypeIterator.h
index 068ec45..d9b38f2 100644
--- a/include/llvm/Support/GetElementPtrTypeIterator.h
+++ b/include/llvm/Support/GetElementPtrTypeIterator.h
@@ -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());
}