xref: /llvm-project/llvm/test/CodeGen/WebAssembly/main-declaration.ll (revision edb2fc6dab2cf04779959829434e9e8572d48a26)
1; RUN: llc < %s -asm-verbose=false | FileCheck %s
2
3; Test main functions with alternate signatures.
4
5target triple = "wasm32-unknown-unknown"
6
7declare i32 @main()
8
9define i32 @foo() {
10  %t = call i32 @main()
11  ret i32 %t
12}
13
14; CHECK-LABEL: foo:
15; CHECK-NEXT:    .functype foo () -> (i32)
16; CHECK-NEXT:    call __original_main
17; CHECK-NEXT:    end_function
18