projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d18a31d
)
Make sure people don't make functiontypes with an invalid return type
author
Chris Lattner
<sabre@nondot.org>
Tue, 6 Jul 2004 23:25:19 +0000
(23:25 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Tue, 6 Jul 2004 23:25:19 +0000
(23:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14654
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Type.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Type.cpp
b/lib/VMCore/Type.cpp
index 50248f21e074161b2da453be1d83bb25e8804423..74542b8e44baa9a3d150e59608cbe636774e31e3 100644
(file)
--- a/
lib/VMCore/Type.cpp
+++ b/
lib/VMCore/Type.cpp
@@
-402,6
+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) &&
+ "LLVM functions cannot return aggregates");
bool isAbstract = Result->isAbstract();
ContainedTys.reserve(Params.size()+1);
ContainedTys.push_back(PATypeHandle(Result, this));