[COFF] Add MC support for emitting IMAGE_WEAK_EXTERN_ANTI_DEPENDENCY symbols
[llvm-project.git] / llvm / test / MC / COFF / weak-anti-dep.s
blobdbf5ffc0a35bf7214a6e18ef1e13ce37305ab92f
1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj --symbols - | FileCheck %s
3 // CHECK: Symbol {
4 // CHECK-NEXT: Name: .text
5 // CHECK: Symbol {
6 // CHECK-NEXT: Name: .data
7 // CHECK: Symbol {
8 // CHECK-NEXT: Name: .bss
10 .weak_anti_dep a
11 a = b
13 // CHECK: Symbol {
14 // CHECK-NEXT: Name: a
15 // CHECK-NEXT: Value: 0
16 // CHECK-NEXT: Section: IMAGE_SYM_UNDEFINED (0)
17 // CHECK-NEXT: BaseType: Null (0x0)
18 // CHECK-NEXT: ComplexType: Null (0x0)
19 // CHECK-NEXT: StorageClass: WeakExternal (0x69)
20 // CHECK-NEXT: AuxSymbolCount: 1
21 // CHECK-NEXT: AuxWeakExternal {
22 // CHECK-NEXT: Linked: b (8)
23 // CHECK-NEXT: Search: AntiDependency (0x4)
24 // CHECK-NEXT: }
25 // CHECK-NEXT: }
26 // CHECK-NEXT: Symbol {
27 // CHECK-NEXT: Name: b
28 // CHECK-NEXT: Value: 0
29 // CHECK-NEXT: Section: IMAGE_SYM_UNDEFINED (0)
30 // CHECK-NEXT: BaseType: Null (0x0)
31 // CHECK-NEXT: ComplexType: Null (0x0)
32 // CHECK-NEXT: StorageClass: External (0x2)
33 // CHECK-NEXT: AuxSymbolCount: 0
34 // CHECK-NEXT: }
37 .weak_anti_dep r1
38 .weak_anti_dep r2
39 r1 = r2
40 r2 = r1
43 // CHECK: Symbol {
44 // CHECK-NEXT: Name: r1
45 // CHECK-NEXT: Value: 0
46 // CHECK-NEXT: Section: IMAGE_SYM_UNDEFINED (0)
47 // CHECK-NEXT: BaseType: Null (0x0)
48 // CHECK-NEXT: ComplexType: Null (0x0)
49 // CHECK-NEXT: StorageClass: WeakExternal (0x69)
50 // CHECK-NEXT: AuxSymbolCount: 1
51 // CHECK-NEXT: AuxWeakExternal {
52 // CHECK-NEXT: Linked: r2 (11)
53 // CHECK-NEXT: Search: AntiDependency (0x4)
54 // CHECK-NEXT: }
55 // CHECK-NEXT: }
56 // CHECK-NEXT: Symbol {
57 // CHECK-NEXT: Name: r2
58 // CHECK-NEXT: Value: 0
59 // CHECK-NEXT: Section: IMAGE_SYM_UNDEFINED (0)
60 // CHECK-NEXT: BaseType: Null (0x0)
61 // CHECK-NEXT: ComplexType: Null (0x0)
62 // CHECK-NEXT: StorageClass: WeakExternal (0x69)
63 // CHECK-NEXT: AuxSymbolCount: 1
64 // CHECK-NEXT: AuxWeakExternal {
65 // CHECK-NEXT: Linked: r1 (9)
66 // CHECK-NEXT: Search: AntiDependency (0x4)
67 // CHECK-NEXT: }
68 // CHECK-NEXT: }