mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-07 01:38:26 +00:00
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:
parent
d554380850
commit
38ac81cbbc
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user