1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/test/MC/WebAssembly/import-module.s
Sam Clegg 7d2c6fd3c7 [WebAssebmly][MC] Support .import_name/.import_field asm directives
Convert the MC test to use asm rather than bitcode.

This is a precursor to https://reviews.llvm.org/D70520.

Differential Revision: https://reviews.llvm.org/D70877
2019-12-06 15:09:56 -08:00

34 lines
1010 B
ArmAsm

# RUN: llvm-mc -triple=wasm32 < %s | FileCheck %s -check-prefix=CHECK-ASM
# RUN: llvm-mc -triple=wasm32 -filetype=obj -o - < %s | obj2yaml | FileCheck %s
test:
.functype test () -> ()
call foo
call plain
end_function
.functype foo () -> ()
.functype plain () -> ()
.import_module foo, bar
.import_name foo, qux
# CHECK-ASM: .import_module foo, bar
# CHECK-ASM: .import_name foo, qux
# CHECK: - Type: IMPORT
# CHECK-NEXT: Imports:
# CHECK: - Module: bar
# CHECK-NEXT: Field: qux
# CHECK-NEXT: Kind: FUNCTION
# CHECK: - Module: env
# CHECK-NEXT: Field: plain
# CHECK-NEXT: Kind: FUNCTION
# CHECK: - Type: CUSTOM
# CHECK: Name: foo
# CHECK-NEXT: Flags: [ UNDEFINED, EXPLICIT_NAME ]
# CHECK: Name: plain
# CHECK-NEXT: Flags: [ UNDEFINED ]