[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / lld / test / wasm / import-table.test
blob73dc7189bbf28bed0532a72f21f87377df1e696f
1 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/start.s -o %t.start.o
2 # RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t.o
3 # RUN: wasm-ld --export-all --import-table -o %t.wasm %t.start.o %t.o
4 # RUN: obj2yaml %t.wasm | FileCheck %s
6 .globl require_function_table
7 require_function_table:
8 .functype require_function_table () -> ()
9           i32.const 1
10           call_indirect () -> ()
11           end_function
13 # Verify the --import-table flag creates a table import
15 # CHECK:       - Type:            IMPORT
16 # CHECK-NEXT:    Imports:
17 # CHECK-NEXT:      - Module:          env
18 # CHECK-NEXT:        Field:           __indirect_function_table
19 # CHECK-NEXT:        Kind:            TABLE
20 # CHECK-NEXT:        Table:
21 # CHECK-NEXT:          Index:           0
22 # CHECK-NEXT:          ElemType:        FUNCREF
23 # CHECK-NEXT:          Limits:
24 # CHECK-NEXT:            Minimum:         0x1