diff --git a/llvm/include/llvm/Instructions.h b/llvm/include/llvm/Instructions.h index 22787570112600b222097589018d24dde51f1afa..6ee18313a221969afe8cc1726eb16b55e0847df6 100644 --- a/llvm/include/llvm/Instructions.h +++ b/llvm/include/llvm/Instructions.h @@ -420,7 +420,7 @@ class GetElementPtrInst : public Instruction { if (NumIdx > 0) // This requires that the iterator points to contiguous memory. - return getIndexedType(Ptr, (Value *const *)&*IdxBegin, NumIdx); + return getIndexedType(Ptr, &*IdxBegin, NumIdx); else return getIndexedType(Ptr, (Value *const*)0, NumIdx); }