diff options
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp')
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp b/llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp index 6ed34d95f9b..9336e0fd50b 100644 --- a/llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp +++ b/llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp @@ -178,6 +178,8 @@ namespace { Type *next_type(Type *Ty, Value *Idx) { + if (auto *PTy = dyn_cast<PointerType>(Ty)) + return PTy->getElementType(); // Advance the type. if (!Ty->isStructTy()) { Type *NexTy = cast<SequentialType>(Ty)->getElementType(); |