From b3364fc169dee54142d14efbdf7b86a17ff8500f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 14 Dec 2001 16:38:04 +0000 Subject: Remove unsized array support llvm-svn: 1466 --- llvm/lib/Transforms/Scalar/LowerAllocations.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'llvm/lib') diff --git a/llvm/lib/Transforms/Scalar/LowerAllocations.cpp b/llvm/lib/Transforms/Scalar/LowerAllocations.cpp index bb2cdb67fa4..666b6d976eb 100644 --- a/llvm/lib/Transforms/Scalar/LowerAllocations.cpp +++ b/llvm/lib/Transforms/Scalar/LowerAllocations.cpp @@ -70,12 +70,6 @@ bool LowerAllocations::doPerMethodWork(Method *M) { const Type *AllocTy =cast(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(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); -- cgit v1.2.3