From e3b557809604d036af6e00c60f012c2025b59a5e Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 11 Feb 2023 13:38:04 +0100 Subject: Vendor import of llvm-project main llvmorg-16-init-18548-gb0daacf58f41, the last commit before the upstream release/17.x branch was created. --- llvm/lib/Analysis/TypeMetadataUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Analysis/TypeMetadataUtils.cpp') 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(User)) { // Take into account the GEP offset. if (VPtr == GEP->getPointerOperand() && GEP->hasAllConstantIndices()) { - SmallVector Indices(GEP->op_begin() + 1, GEP->op_end()); + SmallVector Indices(drop_begin(GEP->operands())); int64_t GEPOffset = M->getDataLayout().getIndexedOffsetInType( GEP->getSourceElementType(), Indices); findLoadCallsAtConstantOffset(M, DevirtCalls, User, Offset + GEPOffset, -- cgit v1.2.3