[llvm] r207023 - Use pointer size function where only a pointer is expected
Matt Arsenault
Matthew.Arsenault at amd.com
Wed Apr 23 14:10:15 PDT 2014
Author: arsenm
Date: Wed Apr 23 16:10:15 2014
New Revision: 207023
URL: http://llvm.org/viewvc/llvm-project?rev=207023&view=rev
Log:
Use pointer size function where only a pointer is expected
Modified:
llvm/trunk/lib/IR/DataLayout.cpp
Modified: llvm/trunk/lib/IR/DataLayout.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DataLayout.cpp?rev=207023&r1=207022&r2=207023&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DataLayout.cpp (original)
+++ llvm/trunk/lib/IR/DataLayout.cpp Wed Apr 23 16:10:15 2014
@@ -708,7 +708,7 @@ IntegerType *DataLayout::getIntPtrType(L
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());
More information about the llvm-commits
mailing list