diff options
author | Chris Lattner <sabre@nondot.org> | 2004-07-13 20:09:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-07-13 20:09:51 +0000 |
commit | b4091e548e0e6057cd3ea64216bf8068b21e8216 (patch) | |
tree | 6c8f2c3a3b11856ee436bdbc93a11a66fc28f209 /lib/VMCore | |
parent | a596f8c3aaeba95fa20706bb0c441ff1b3afc8b8 (diff) | |
download | external_llvm-b4091e548e0e6057cd3ea64216bf8068b21e8216.zip external_llvm-b4091e548e0e6057cd3ea64216bf8068b21e8216.tar.gz external_llvm-b4091e548e0e6057cd3ea64216bf8068b21e8216.tar.bz2 |
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
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Type.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index 32b783b..c6ce347 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -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(); } |