summaryrefslogtreecommitdiff
path: root/lib/VMCore/Verifier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/Verifier.cpp')
-rw-r--r--lib/VMCore/Verifier.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp
index d1593173f3..4f67889e9d 100644
--- a/lib/VMCore/Verifier.cpp
+++ b/lib/VMCore/Verifier.cpp
@@ -338,17 +338,17 @@ void Verifier::visitFunction(Function &F) {
F.getReturnType() == Type::VoidTy,
"Functions cannot return aggregate values!", &F);
+ Assert1(!FT->isStructReturn() ||
+ (FT->getReturnType() == Type::VoidTy &&
+ FT->getNumParams() > 0 && isa<PointerType>(FT->getParamType(0))),
+ "Invalid struct-return function!", &F);
+
// Check that this function meets the restrictions on this calling convention.
switch (F.getCallingConv()) {
default:
break;
case CallingConv::C:
break;
- case CallingConv::CSRet:
- Assert1(FT->getReturnType() == Type::VoidTy &&
- FT->getNumParams() > 0 && isa<PointerType>(FT->getParamType(0)),
- "Invalid struct-return function!", &F);
- break;
case CallingConv::Fast:
case CallingConv::Cold:
case CallingConv::X86_FastCall: