Remove unsized array support

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1466 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2001-12-14 16:38:04 +00:00
parent d554380850
commit 38ac81cbbc

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);