mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-16 16:37:30 +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:
parent
d18a31d2fa
commit
edfc49de13
@ -402,6 +402,8 @@ FunctionType::FunctionType(const Type *Result,
|
||||
const std::vector<const Type*> &Params,
|
||||
bool IsVarArgs) : DerivedType(FunctionTyID),
|
||||
isVarArgs(IsVarArgs) {
|
||||
assert((Result->isFirstClassType() || Result == Type::VoidTy) &&
|
||||
"LLVM functions cannot return aggregates");
|
||||
bool isAbstract = Result->isAbstract();
|
||||
ContainedTys.reserve(Params.size()+1);
|
||||
ContainedTys.push_back(PATypeHandle(Result, this));
|
||||
|
Loading…
Reference in New Issue
Block a user