diff options
author | Chris Lattner <sabre@nondot.org> | 2005-02-01 01:47:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-02-01 01:47:42 +0000 |
commit | 595f06c6da14842c6be586eda6cbba202a6bc18f (patch) | |
tree | 4c13cb9947f005f5d392abf96c5ebac7dbfe669d | |
parent | 4047a49cdc502db48a98b693eee40fee2bc83727 (diff) | |
download | external_llvm-595f06c6da14842c6be586eda6cbba202a6bc18f.zip external_llvm-595f06c6da14842c6be586eda6cbba202a6bc18f.tar.gz external_llvm-595f06c6da14842c6be586eda6cbba202a6bc18f.tar.bz2 |
Fix test/Regression/Assembler/2005-01-31-CallingAggregateFunction.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19966 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AsmParser/llvmAsmParser.y | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index 13df7fe..0f2af20 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -2057,6 +2057,9 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef { bool isVarArg = ParamTypes.size() && ParamTypes.back() == Type::VoidTy; if (isVarArg) ParamTypes.pop_back(); + if (!(*$2)->isFirstClassType() && *$2 != Type::VoidTy) + ThrowException("LLVM functions cannot return aggregate types!"); + Ty = FunctionType::get($2->get(), ParamTypes, isVarArg); PFTy = PointerType::get(Ty); } |