1; RUN: llc -mtriple=x86_64-windows-msvc < %s | FileCheck %s
2
3; An unknown personality forces us to emit an Itanium LSDA. Make sure that the
4; Itanium call site table actually tells the personality to keep unwinding,
5; i.e. we have an entry and it says "has no landing pad".
6
7declare void @throwit()
8declare void @__unknown_ehpersonality(...)
9
10define void @use_unknown_ehpersonality()
11    personality void (...)* @__unknown_ehpersonality {
12entry:
13  call void @throwit()
14  unreachable
15}
16
17; CHECK-LABEL: use_unknown_ehpersonality:
18; CHECK: .Lfunc_begin0:
19; CHECK: .seh_handler __unknown_ehpersonality, @unwind, @except
20; CHECK: callq throwit
21; CHECK: .Lfunc_end0:
22; CHECK: .seh_handlerdata
23; CHECK: .Lexception0:
24; CHECK:  .byte   255                     # @LPStart Encoding = omit
25; CHECK:  .byte   255                     # @TType Encoding = omit
26; CHECK:  .byte   1                       # Call site Encoding = uleb128
27; CHECK:  .uleb128 .Lcst_end0-.Lcst_begin0
28; CHECK:  .Lcst_begin0:
29; CHECK:  .uleb128 .Lfunc_begin0-.Lfunc_begin0 # >> Call Site 1 <<
30; CHECK:  .uleb128 .Lfunc_end0-.Lfunc_begin0 #   Call between .Lfunc_begin0 and .Lfunc_end0
31; CHECK:  .byte   0                       #     has no landing pad
32; CHECK:  .byte   0                       #   On action: cleanup
33; CHECK:  .Lcst_end0:
34