diff options
author | Chris Lattner <sabre@nondot.org> | 2004-07-07 06:48:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-07-07 06:48:27 +0000 |
commit | c964715a76ba328b16ce6d07a5e41512b3738bfe (patch) | |
tree | 73de6c52bcf404a853ae49f7316b53f6d5a71c25 /lib/VMCore/Type.cpp | |
parent | 8adbec89ce72feff0a06fa28693d15820b80a0d8 (diff) | |
download | external_llvm-c964715a76ba328b16ce6d07a5e41512b3738bfe.zip external_llvm-c964715a76ba328b16ce6d07a5e41512b3738bfe.tar.gz external_llvm-c964715a76ba328b16ce6d07a5e41512b3738bfe.tar.bz2 |
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
Diffstat (limited to 'lib/VMCore/Type.cpp')
-rw-r--r-- | lib/VMCore/Type.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index 74542b8..026ba1b 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -402,7 +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) && + assert((Result->isFirstClassType() || Result == Type::VoidTy || + isa<OpaqueType>(Result)) && "LLVM functions cannot return aggregates"); bool isAbstract = Result->isAbstract(); ContainedTys.reserve(Params.size()+1); |