From 38ac81cbbc147f3d2551d472b099d8de6767f7fd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 14 Dec 2001 16:38:04 +0000 Subject: [PATCH] Remove unsized array support git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1466 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Utils/LowerAllocations.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp index bb2cdb67fa4..666b6d976eb 100644 --- a/lib/Transforms/Utils/LowerAllocations.cpp +++ b/lib/Transforms/Utils/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);