From c964715a76ba328b16ce6d07a5e41512b3738bfe Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 7 Jul 2004 06:48:27 +0000 Subject: [PATCH] The bytecode reader wants to be able to read types that are not quite resolved yet, then resolve them in it's own sweet time. We must support this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14666 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/Type.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index 74542b8e44b..026ba1bb6a0 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -402,7 +402,8 @@ FunctionType::FunctionType(const Type *Result, const std::vector &Params, bool IsVarArgs) : DerivedType(FunctionTyID), isVarArgs(IsVarArgs) { - assert((Result->isFirstClassType() || Result == Type::VoidTy) && + assert((Result->isFirstClassType() || Result == Type::VoidTy || + isa(Result)) && "LLVM functions cannot return aggregates"); bool isAbstract = Result->isAbstract(); ContainedTys.reserve(Params.size()+1); -- 2.34.1