Remove unsized array support
authorChris Lattner <sabre@nondot.org>
Fri, 14 Dec 2001 16:38:04 +0000 (16:38 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 14 Dec 2001 16:38:04 +0000 (16:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1466 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/LowerAllocations.cpp

index bb2cdb67fa49f4b5ffeb23985bffce4cb2b32231..666b6d976ebe5ed5e9af596fb22804c95ada08ac 100644 (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);