xref: /aosp_15_r20/external/llvm/test/CodeGen/WinEH/wineh-intrinsics-invalid.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: sed -e s/.T1:// %s | not opt -lint -disable-output 2>&1 | FileCheck --check-prefix=CHECK1 %s
2*9880d681SAndroid Build Coastguard Worker; RUN: sed -e s/.T2:// %s | not opt -lint -disable-output 2>&1 | FileCheck --check-prefix=CHECK2 %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Workertarget triple = "x86_64-pc-windows-msvc"
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Workerdeclare void @f()
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Worker;T1: declare i8* @llvm.eh.exceptionpointer.p0i8(i32)
9*9880d681SAndroid Build Coastguard Worker;T1:
10*9880d681SAndroid Build Coastguard Worker;T1: define void @test1() personality i32 (...)* @__CxxFrameHandler3 {
11*9880d681SAndroid Build Coastguard Worker;T1:   call i8* @llvm.eh.exceptionpointer.p0i8(i32 0)
12*9880d681SAndroid Build Coastguard Worker;T1:   ret void
13*9880d681SAndroid Build Coastguard Worker;T1: }
14*9880d681SAndroid Build Coastguard Worker;CHECK1: Intrinsic has incorrect argument type!
15*9880d681SAndroid Build Coastguard Worker;CHECK1-NEXT: i8* (i32)* @llvm.eh.exceptionpointer.p0i8
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard Worker;T2: declare i8* @llvm.eh.exceptionpointer.p0i8(token)
18*9880d681SAndroid Build Coastguard Worker;T2:
19*9880d681SAndroid Build Coastguard Worker;T2: define void @test2() personality i32 (...)* @__CxxFrameHandler3 {
20*9880d681SAndroid Build Coastguard Worker;T2:   call i8* @llvm.eh.exceptionpointer.p0i8(token undef)
21*9880d681SAndroid Build Coastguard Worker;T2:   ret void
22*9880d681SAndroid Build Coastguard Worker;T2: }
23*9880d681SAndroid Build Coastguard Worker;CHECK2: eh.exceptionpointer argument must be a catchpad
24*9880d681SAndroid Build Coastguard Worker;CHECK2-NEXT:  call i8* @llvm.eh.exceptionpointer.p0i8(token undef)
25*9880d681SAndroid Build Coastguard Worker
26*9880d681SAndroid Build Coastguard Workerdeclare i32 @__CxxFrameHandler3(...)
27