diff options
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp')
| -rw-r--r-- | llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp b/llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp index 9f18d0b3162c..43f0758f6598 100644 --- a/llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp +++ b/llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp @@ -386,9 +386,8 @@ void HexagonCommonGEP::processGepInst(GetElementPtrInst *GepI, // dereferences the pointer operand. GepNode *PN = N; Type *PtrTy = GepI->getSourceElementType(); - for (User::op_iterator OI = GepI->idx_begin()+1, OE = GepI->idx_end(); - OI != OE; ++OI) { - Value *Op = *OI; + for (Use &U : llvm::drop_begin(GepI->indices())) { + Value *Op = U; GepNode *Nx = new (*Mem) GepNode; Nx->Parent = PN; // Link Nx to the previous node. Nx->Flags |= GepNode::Internal | InBounds; |
