aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/Type.cpp')
-rw-r--r--lib/VMCore/Type.cpp3
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);