summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-12-14 16:38:04 +0000
committerChris Lattner <sabre@nondot.org>2001-12-14 16:38:04 +0000
commit38ac81cbbc147f3d2551d472b099d8de6767f7fd (patch)
tree071ab5d8cfe45597b3791d4f91e5518d721b8df9 /lib/Transforms
parentd55438085090886a1c7ddc37159b1cfb406fbce4 (diff)
downloadllvm-38ac81cbbc147f3d2551d472b099d8de6767f7fd.tar.gz
llvm-38ac81cbbc147f3d2551d472b099d8de6767f7fd.tar.bz2
llvm-38ac81cbbc147f3d2551d472b099d8de6767f7fd.tar.xz
Remove unsized array support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1466 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Utils/LowerAllocations.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp
index bb2cdb67fa..666b6d976e 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<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);