diff options
Diffstat (limited to 'llvm/lib/Analysis/TypeMetadataUtils.cpp')
-rw-r--r-- | llvm/lib/Analysis/TypeMetadataUtils.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/TypeMetadataUtils.cpp b/llvm/lib/Analysis/TypeMetadataUtils.cpp index e128187bac49..1c9354fbe01f 100644 --- a/llvm/lib/Analysis/TypeMetadataUtils.cpp +++ b/llvm/lib/Analysis/TypeMetadataUtils.cpp @@ -61,7 +61,7 @@ static void findLoadCallsAtConstantOffset( } else if (auto GEP = dyn_cast<GetElementPtrInst>(User)) { // Take into account the GEP offset. if (VPtr == GEP->getPointerOperand() && GEP->hasAllConstantIndices()) { - SmallVector<Value *, 8> Indices(GEP->op_begin() + 1, GEP->op_end()); + SmallVector<Value *, 8> Indices(drop_begin(GEP->operands())); int64_t GEPOffset = M->getDataLayout().getIndexedOffsetInType( GEP->getSourceElementType(), Indices); findLoadCallsAtConstantOffset(M, DevirtCalls, User, Offset + GEPOffset, |