1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Remove unsized array support

llvm-svn: 1466
This commit is contained in:
Chris Lattner 2001-12-14 16:38:04 +00:00
parent cd134c6891
commit 9e6ccdd858

View File

@ -70,12 +70,6 @@ bool LowerAllocations::doPerMethodWork(Method *M) {
const Type *AllocTy =cast<PointerType>(MI->getType())->getElementType();
// If the user is allocating an unsized array with a dynamic size arg,
// start by getting the size of one element.
//
if (const ArrayType *ATy = dyn_cast<ArrayType>(AllocTy))
if (ATy->isUnsized()) AllocTy = ATy->getElementType();
// Get the number of bytes to be allocated for one element of the
// requested type...
unsigned Size = DataLayout.getTypeSize(AllocTy);