summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DataLayout.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2014-04-23 21:10:15 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2014-04-23 21:10:15 +0000
commit4dbd4891c7bdfcecb4933a50ca72285acc238850 (patch)
tree7b444b1d55f676147bc0addbb2af5c25d320ffdf /llvm/lib/IR/DataLayout.cpp
parente226b08ee99cb1e868e4f48e847199d7fd21aee7 (diff)
downloadbcm5719-llvm-4dbd4891c7bdfcecb4933a50ca72285acc238850.tar.gz
bcm5719-llvm-4dbd4891c7bdfcecb4933a50ca72285acc238850.zip
Use pointer size function where only a pointer is expected
llvm-svn: 207023
Diffstat (limited to 'llvm/lib/IR/DataLayout.cpp')
-rw-r--r--llvm/lib/IR/DataLayout.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/DataLayout.cpp b/llvm/lib/IR/DataLayout.cpp
index 7c3bc3df6d1..dea05fbef4a 100644
--- a/llvm/lib/IR/DataLayout.cpp
+++ b/llvm/lib/IR/DataLayout.cpp
@@ -708,7 +708,7 @@ IntegerType *DataLayout::getIntPtrType(LLVMContext &C,
Type *DataLayout::getIntPtrType(Type *Ty) const {
assert(Ty->isPtrOrPtrVectorTy() &&
"Expected a pointer or pointer vector type.");
- unsigned NumBits = getTypeSizeInBits(Ty->getScalarType());
+ unsigned NumBits = getPointerTypeSizeInBits(Ty);
IntegerType *IntTy = IntegerType::get(Ty->getContext(), NumBits);
if (VectorType *VecTy = dyn_cast<VectorType>(Ty))
return VectorType::get(IntTy, VecTy->getNumElements());
OpenPOWER on IntegriCloud