• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -S -deadargelim < %s | FileCheck %s
2target triple = "x86_64-pc-windows-msvc"
3
4define internal void @callee(i8*) {
5entry:
6  call void @thunk()
7  ret void
8}
9
10define void @test1() personality i32 (...)* @__CxxFrameHandler3 {
11entry:
12  invoke void @thunk()
13          to label %good1 unwind label %bad1
14
15good1:                                            ; preds = %entry-block
16  ret void
17
18bad1:                                             ; preds = %entry-block
19  %pad1 = cleanuppad within none []
20  call void @callee(i8* null) [ "funclet"(token %pad1) ]
21  cleanupret from %pad1 unwind to caller
22}
23; CHECK-LABEL: define void @test1(
24; CHECK:      %[[pad:.*]] = cleanuppad within none []
25; CHECK-NEXT: call void @callee() [ "funclet"(token %[[pad]]) ]
26
27declare void @thunk()
28
29declare i32 @__CxxFrameHandler3(...)
30