summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DataLayout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/DataLayout.cpp')
-rw-r--r--llvm/lib/IR/DataLayout.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/IR/DataLayout.cpp b/llvm/lib/IR/DataLayout.cpp
index d1096d74242..d786d33f9ca 100644
--- a/llvm/lib/IR/DataLayout.cpp
+++ b/llvm/lib/IR/DataLayout.cpp
@@ -514,8 +514,7 @@ unsigned DataLayout::getPointerTypeSizeInBits(Type *Ty) const {
if (Ty->isPointerTy())
return getTypeSizeInBits(Ty);
- Type *EleTy = cast<VectorType>(Ty)->getElementType();
- return getTypeSizeInBits(EleTy);
+ return getTypeSizeInBits(Ty->getScalarType());
}
/*!
OpenPOWER on IntegriCloud