diff options
-rw-r--r-- | lib/IR/DataLayout.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/IR/DataLayout.cpp b/lib/IR/DataLayout.cpp index d1096d7424..d786d33f9c 100644 --- a/lib/IR/DataLayout.cpp +++ b/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()); } /*! |