about summary refs log tree commit diff homepage
path: root/lib/Core/GetElementPtrTypeIterator.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Core/GetElementPtrTypeIterator.h')
-rw-r--r--lib/Core/GetElementPtrTypeIterator.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/Core/GetElementPtrTypeIterator.h b/lib/Core/GetElementPtrTypeIterator.h
index 4e0314cb..e4ca8dc9 100644
--- a/lib/Core/GetElementPtrTypeIterator.h
+++ b/lib/Core/GetElementPtrTypeIterator.h
@@ -71,12 +71,7 @@ public:
   llvm::Type *operator*() const { return CurTy; }
 
   llvm::Type *getIndexedType() const {
-#if LLVM_VERSION_CODE >= LLVM_VERSION(11, 0)
       return llvm::GetElementPtrInst::getTypeAtIndex(CurTy, getOperand());
-#else
-      llvm::CompositeType *CT = cast<llvm::CompositeType>(CurTy);
-      return CT->getTypeAtIndex(getOperand());
-#endif
   }
 
     // This is a non-standard operator->.  It allows you to call methods on the
@@ -86,14 +81,9 @@ public:
     llvm::Value *getOperand() const { return asValue(*OpIt); }
 
     generic_gep_type_iterator& operator++() {   // Preincrement
-#if LLVM_VERSION_CODE >= LLVM_VERSION(11, 0)
       if (isa<llvm::StructType>(CurTy) || isa<llvm::ArrayType>(CurTy) ||
           isa<llvm::VectorType>(CurTy)) {
         CurTy = llvm::GetElementPtrInst::getTypeAtIndex(CurTy, getOperand());
-#else
-      if (llvm::CompositeType *CT = dyn_cast<llvm::CompositeType>(CurTy)) {
-        CurTy = CT->getTypeAtIndex(getOperand());
-#endif
       } else if (CurTy->isPointerTy()) {
         CurTy = CurTy->getPointerElementType();
       } else {