summaryrefslogtreecommitdiff
path: root/lib/Analysis/InstructionSimplify.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-07-25 09:48:08 +0000
committerJay Foad <jay.foad@gmail.com>2011-07-25 09:48:08 +0000
commita9203109f4ac95aa7e9624f2838e3d89623ec902 (patch)
tree49efd5cde506bb3127e6c0b4a4b8f504d5466dcf /lib/Analysis/InstructionSimplify.cpp
parentb7fbcc9696e38ca26c7eb67077c04b51c846c9cb (diff)
downloadllvm-a9203109f4ac95aa7e9624f2838e3d89623ec902.tar.gz
llvm-a9203109f4ac95aa7e9624f2838e3d89623ec902.tar.bz2
llvm-a9203109f4ac95aa7e9624f2838e3d89623ec902.tar.xz
Convert GetElementPtrInst to use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135904 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/InstructionSimplify.cpp')
-rw-r--r--lib/Analysis/InstructionSimplify.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Analysis/InstructionSimplify.cpp b/lib/Analysis/InstructionSimplify.cpp
index aa1546b877..5cfe4065c2 100644
--- a/lib/Analysis/InstructionSimplify.cpp
+++ b/lib/Analysis/InstructionSimplify.cpp
@@ -2230,8 +2230,7 @@ Value *llvm::SimplifyGEPInst(ArrayRef<Value *> Ops,
if (isa<UndefValue>(Ops[0])) {
// Compute the (pointer) type returned by the GEP instruction.
- Type *LastType = GetElementPtrInst::getIndexedType(PtrTy, Ops.data() + 1,
- Ops.size() - 1);
+ Type *LastType = GetElementPtrInst::getIndexedType(PtrTy, Ops.slice(1));
Type *GEPTy = PointerType::get(LastType, PtrTy->getAddressSpace());
return UndefValue::get(GEPTy);
}