xref: /llvm-project/llvm/test/Verifier/invalid-cleanuppad-chain.ll (revision c820f2a43eaba02db97c4ff60c58a58e6bdd391d)
1; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
2
3; CHECK: CleanupReturnInst needs to be provided a CleanupPad
4; CHECK-NEXT: cleanupret from undef unwind label %bb2
5; CHECK-NEXT: token undef
6; CHECK: Parent pad must be catchpad/cleanuppad/catchswitch
7; CHECK-NEXT: cleanupret from undef unwind label %bb2
8
9define void @test() personality ptr undef {
10  br label %bb1
11
12bb1:
13  cleanupret from undef unwind label %bb2
14
15bb2:
16  %pad = cleanuppad within none []
17  cleanupret from %pad unwind to caller
18}
19