xref: /llvm-project/llvm/test/CodeGen/WebAssembly/only-data.ll (revision 73856247eef35f5336e485dc009842a5b991c421)
1c67c9cfeSPaulo Matos; RUN: llc < %s --mtriple=wasm32-unknown-unknown -asm-verbose=false -mattr=+reference-types | FileCheck %s
2c67c9cfeSPaulo Matos; Verify that types are output for external symbols, even in the absence of any defined functions
3c67c9cfeSPaulo Matos
4c67c9cfeSPaulo Matos;      CHECK: .type foo,@object
5c67c9cfeSPaulo Matos; CHECK-NEXT: .section .data.foo,"",@
6c67c9cfeSPaulo Matos; CHECK-NEXT: .globl foo
7*73856247SNikita Popov@foo = local_unnamed_addr global ptr @bar, align 4
8c67c9cfeSPaulo Matos
9c67c9cfeSPaulo Matos; CHECK-LABEL: foo:
10c67c9cfeSPaulo Matos;  CHECK-NEXT: .int32 bar
11c67c9cfeSPaulo Matos;  CHECK-NEXT: .size foo, 4
12c67c9cfeSPaulo Matos
13c67c9cfeSPaulo Matos; CHECK: .functype bar (i32) -> (i32)
14c67c9cfeSPaulo Matosdeclare i32 @bar(i32 noundef)
15