DataLayout should use itself when calculating the size of a vector.
authorHal Finkel <hfinkel@anl.gov>
Sun, 21 Oct 2012 20:38:03 +0000 (20:38 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sun, 21 Oct 2012 20:38:03 +0000 (20:38 +0000)
commit3d39fb8a3f0a29468f59456d723ac477fc549c08
treefd2a0a131732e9b3117d8495da3619cfd241d778
parent3740e798bc850cd5d40185959801606433b0221f
DataLayout should use itself when calculating the size of a vector.

This is important for vectors of pointers because only DataLayout,
not the underlying vector type, knows how to calculate the size
of the pointers in the vector. Fixes PR14138.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166401 91177308-0d34-0410-b5e6-96231b3b80d8
lib/VMCore/DataLayout.cpp
test/Transforms/BBVectorize/simple-ldstr-ptrs.ll