diff options
Diffstat (limited to 'lib/VMCore/Function.cpp')
-rw-r--r-- | lib/VMCore/Function.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp index cbe11f0b6c..ee386630d7 100644 --- a/lib/VMCore/Function.cpp +++ b/lib/VMCore/Function.cpp @@ -179,7 +179,8 @@ Function::Function(const FunctionType *Ty, LinkageTypes Linkage, ParamAttrs(0) { SymTab = new ValueSymbolTable(); - assert((getReturnType()->isFirstClassType() ||getReturnType() == Type::VoidTy) + assert((getReturnType()->isFirstClassType() ||getReturnType() == Type::VoidTy + || getReturnType()->getTypeID() == Type::StructTyID) && "LLVM functions cannot return aggregate values!"); // If the function has arguments, mark them as lazily built. |