File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -581,18 +581,19 @@ void Verifier::visitReturnInst(ReturnInst &RI) {
581
581
Assert2 (F->getReturnType () == Type::VoidTy,
582
582
" Found return instr that returns void in Function of non-void "
583
583
" return type!" , &RI, F->getReturnType ());
584
- else if (N == 1 )
585
- Assert2 (F->getReturnType () == RI.getOperand (0 )->getType (),
586
- " Function return type does not match operand "
587
- " type of return inst!" , &RI, F->getReturnType ());
588
584
else if (const StructType *STy = dyn_cast<StructType>(F->getReturnType ())) {
589
585
for (unsigned i = 0 ; i < N; i++)
590
586
Assert2 (STy->getElementType (i) == RI.getOperand (i)->getType (),
591
587
" Function return type does not match operand "
592
588
" type of return inst!" , &RI, F->getReturnType ());
593
- } else
589
+ }
590
+ else if (N == 1 )
591
+ Assert2 (F->getReturnType () == RI.getOperand (0 )->getType (),
592
+ " Function return type does not match operand "
593
+ " type of return inst!" , &RI, F->getReturnType ());
594
+ else
594
595
Assert1 (0 , " Invalid return type!" , &RI);
595
-
596
+
596
597
// Check to make sure that the return value has necessary properties for
597
598
// terminators...
598
599
visitTerminatorInst (RI);
You can’t perform that action at this time.
0 commit comments