summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DataLayout.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2013-07-27 19:22:28 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2013-07-27 19:22:28 +0000
commit517cf483c0a17278c2b8688c6c00b3673ca09649 (patch)
tree70dd7230a7ad15f5efe629d9766d15f01f77719e /llvm/lib/IR/DataLayout.cpp
parentf25768103a4779c5912340ee06c3fb144b93565a (diff)
downloadbcm5719-llvm-517cf483c0a17278c2b8688c6c00b3673ca09649.tar.gz
bcm5719-llvm-517cf483c0a17278c2b8688c6c00b3673ca09649.zip
Minor code simplification suggested by Duncan
llvm-svn: 187309
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