mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
[opaque pointer type] Store the value type of an alloca
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236175 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -864,8 +864,9 @@ AllocaInst::AllocaInst(Type *Ty, Value *ArraySize, const Twine &Name,
|
||||
|
||||
AllocaInst::AllocaInst(Type *Ty, Value *ArraySize, unsigned Align,
|
||||
const Twine &Name, Instruction *InsertBefore)
|
||||
: UnaryInstruction(PointerType::getUnqual(Ty), Alloca,
|
||||
getAISize(Ty->getContext(), ArraySize), InsertBefore) {
|
||||
: UnaryInstruction(PointerType::getUnqual(Ty), Alloca,
|
||||
getAISize(Ty->getContext(), ArraySize), InsertBefore),
|
||||
AllocatedType(Ty) {
|
||||
setAlignment(Align);
|
||||
assert(!Ty->isVoidTy() && "Cannot allocate void!");
|
||||
setName(Name);
|
||||
@@ -873,8 +874,9 @@ AllocaInst::AllocaInst(Type *Ty, Value *ArraySize, unsigned Align,
|
||||
|
||||
AllocaInst::AllocaInst(Type *Ty, Value *ArraySize, unsigned Align,
|
||||
const Twine &Name, BasicBlock *InsertAtEnd)
|
||||
: UnaryInstruction(PointerType::getUnqual(Ty), Alloca,
|
||||
getAISize(Ty->getContext(), ArraySize), InsertAtEnd) {
|
||||
: UnaryInstruction(PointerType::getUnqual(Ty), Alloca,
|
||||
getAISize(Ty->getContext(), ArraySize), InsertAtEnd),
|
||||
AllocatedType(Ty) {
|
||||
setAlignment(Align);
|
||||
assert(!Ty->isVoidTy() && "Cannot allocate void!");
|
||||
setName(Name);
|
||||
@@ -899,10 +901,6 @@ bool AllocaInst::isArrayAllocation() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
Type *AllocaInst::getAllocatedType() const {
|
||||
return getType()->getElementType();
|
||||
}
|
||||
|
||||
/// isStaticAlloca - Return true if this alloca is in the entry block of the
|
||||
/// function and is a constant size. If so, the code generator will fold it
|
||||
/// into the prolog/epilog code, so it is basically free.
|
||||
|
Reference in New Issue
Block a user