Catch aggregates passed by value sooner rather than later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14800 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-07-13 20:09:51 +00:00
parent a596f8c3aa
commit b4091e548e

View File

@ -364,6 +364,9 @@ FunctionType::FunctionType(const Type *Result,
ContainedTys.push_back(PATypeHandle(Result, this));
for (unsigned i = 0; i != Params.size(); ++i) {
assert((Params[i]->isFirstClassType() || isa<OpaqueType>(Params[i])) &&
"Function arguments must be value types!");
ContainedTys.push_back(PATypeHandle(Params[i], this));
isAbstract |= Params[i]->isAbstract();
}