mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
Make sure people don't make functiontypes with an invalid return type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14654 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -402,6 +402,8 @@ FunctionType::FunctionType(const Type *Result,
|
|||||||
const std::vector<const Type*> &Params,
|
const std::vector<const Type*> &Params,
|
||||||
bool IsVarArgs) : DerivedType(FunctionTyID),
|
bool IsVarArgs) : DerivedType(FunctionTyID),
|
||||||
isVarArgs(IsVarArgs) {
|
isVarArgs(IsVarArgs) {
|
||||||
|
assert((Result->isFirstClassType() || Result == Type::VoidTy) &&
|
||||||
|
"LLVM functions cannot return aggregates");
|
||||||
bool isAbstract = Result->isAbstract();
|
bool isAbstract = Result->isAbstract();
|
||||||
ContainedTys.reserve(Params.size()+1);
|
ContainedTys.reserve(Params.size()+1);
|
||||||
ContainedTys.push_back(PATypeHandle(Result, this));
|
ContainedTys.push_back(PATypeHandle(Result, this));
|
||||||
|
Reference in New Issue
Block a user