1 # RUN: llvm-mc -triple=wasm32-unknown-unknown -filetype=obj < %s | obj2yaml | FileCheck %s
3 # Tests use of externref type, including storing it in a global
5 .globaltype my_global, externref
9 .functype read_externref () -> (externref)
13 .globl write_externref
15 .functype write_externref (externref) -> ()
22 .functype call_with_ref () -> ()
29 # CHECK: - Type: GLOBAL
30 # CHECK-NEXT: Globals:
31 # CHECK-NEXT: - Index: 0
32 # CHECK-NEXT: Type: EXTERNREF
33 # CHECK-NEXT: Mutable: true
34 # CHECK-NEXT: InitExpr:
35 # CHECK-NEXT: Opcode: REF_NULL
36 # CHECK-NEXT: Type: EXTERNREF