[NFC][analyzer][docs] Crosslink MallocChecker's ownership attributes (#121939)
[llvm-project.git] / lld / test / wasm / lto / relocatable-undefined.ll
blob37ec50e1319619ffb90efa61cc2943b9e38ca1b7
1 ; RUN: llvm-as %s -o %t.o
2 ; RUN: wasm-ld -r -o %t.wasm %t.o
3 ; RUN: obj2yaml %t.wasm | FileCheck %s
5 target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20"
6 target triple = "wasm32-unknown-unknown"
8 @missing_data = external global i32
9 declare i32 @missing_func() local_unnamed_addr
11 define i32 @foo() {
12 entry:
13   %0 = call i32 @missing_func()
14   %1 = load i32, ptr @missing_data, align 4
15   ret i32 %1
19 ; CHECK:        - Type:            CUSTOM
20 ; CHECK-NEXT:     Name:            linking
21 ; CHECK-NEXT:     Version:         2
22 ; CHECK-NEXT:     SymbolTable:     
23 ; CHECK-NEXT:       - Index:           0
24 ; CHECK-NEXT:         Kind:            FUNCTION
25 ; CHECK-NEXT:         Name:            missing_func
26 ; CHECK-NEXT:         Flags:           [ UNDEFINED ]
27 ; CHECK-NEXT:         Function:        0
28 ; CHECK-NEXT:       - Index:           1
29 ; CHECK-NEXT:         Kind:            FUNCTION
30 ; CHECK-NEXT:         Name:            foo
31 ; CHECK-NEXT:         Flags:           [  ]
32 ; CHECK-NEXT:         Function:        1
33 ; CHECK-NEXT:       - Index:           2
34 ; CHECK-NEXT:         Kind:            DATA
35 ; CHECK-NEXT:         Name:            missing_data
36 ; CHECK-NEXT:         Flags:           [ UNDEFINED ]