[MIParser] Set RegClassOrRegBank during instruction parsing
[llvm-complete.git] / test / MC / WebAssembly / event-section.ll
blobb662c290d3c7e0b4f4f1d1e45445bd34744eb721
1 ; RUN: llc -filetype=obj -exception-model=wasm -mattr=+exception-handling %s -o - | obj2yaml | FileCheck %s
2 ; RUN: llc -filetype=obj -exception-model=wasm -mattr=+exception-handling %s -o - | llvm-readobj -S | FileCheck -check-prefix=SEC %s
4 target triple = "wasm32-unknown-unknown"
6 declare void @llvm.wasm.throw(i32, i8*)
8 define i32 @test_throw0(i8* %p) {
9   call void @llvm.wasm.throw(i32 0, i8* %p)
10   ret i32 0
13 define i32 @test_throw1(i8* %p) {
14   call void @llvm.wasm.throw(i32 0, i8* %p)
15   ret i32 1
18 ; CHECK:      Sections:
19 ; CHECK-NEXT:   - Type:            TYPE
20 ; CHECK-NEXT:     Signatures:
21 ; CHECK-NEXT:       - Index:           0
22 ; CHECK-NEXT:         ParamTypes:
23 ; CHECK-NEXT:           - I32
24 ; CHECK-NEXT:         ReturnTypes:
25 ; CHECK-NEXT:           - I32
26 ; CHECK-NEXT:       - Index:           1
27 ; CHECK-NEXT:         ParamTypes:
28 ; CHECK-NEXT:           - I32
29 ; CHECK-NEXT:         ReturnTypes:      []
31 ; CHECK:        - Type:            EVENT
32 ; CHECK-NEXT:     Events:
33 ; CHECK-NEXT:       - Index:           0
34 ; CHECK-NEXT:         Attribute:       0
35 ; CHECK-NEXT:         SigIndex:        1
37 ; CHECK-NEXT:   - Type:            CODE
38 ; CHECK-NEXT:     Relocations:
39 ; CHECK-NEXT:       - Type:            R_WASM_EVENT_INDEX_LEB
40 ; CHECK-NEXT:         Index:           1
41 ; CHECK-NEXT:         Offset:          0x00000006
42 ; CHECK-NEXT:       - Type:            R_WASM_EVENT_INDEX_LEB
43 ; CHECK-NEXT:         Index:           1
44 ; CHECK-NEXT:         Offset:          0x00000011
46 ; CHECK:        - Type:            CUSTOM
47 ; CHECK-NEXT:     Name:            linking
48 ; CHECK-NEXT:     Version:         2
49 ; CHECK-NEXT:     SymbolTable:
51 ; CHECK:            - Index:           1
52 ; CHECK-NEXT:         Kind:            EVENT
53 ; CHECK-NEXT:         Name:            __cpp_exception
54 ; CHECK-NEXT:         Flags:           [ BINDING_WEAK ]
55 ; CHECK-NEXT:         Event:           0
57 ; SEC:          Type: EVENT (0xD)
58 ; SEC-NEXT:     Size: 3
59 ; SEC-NEXT:     Offset: 97