[obj2yaml] - Fix a comment. NFC.
[llvm-complete.git] / test / MC / COFF / symbol-alias.s
bloba20651b690fd649c3ace321e506c5549e810b57a
1 // The purpose of this test is to verify that symbol aliases
2 // (@foo: alias <type> @bar) generate the correct entries in the symbol table.
3 // They should be identical except for the name.
5 // RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj --symbols | FileCheck %s
6 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj --symbols | FileCheck %s
8 .def _foo;
9 .scl 2;
10 .type 32;
11 .endef
12 .text
13 .globl _foo
14 .align 16, 0x90
15 _foo: # @foo
16 # %bb.0: # %entry
17 ret
19 .data
20 .globl _bar # @bar
21 .align 4
22 _bar:
23 .long 0 # 0x0
26 # Order is important here. Assign _bar_alias_alias before _bar_alias.
27 .globl _foo_alias
28 _foo_alias = _foo
29 .globl _bar_alias_alias
30 _bar_alias_alias = _bar_alias
31 .globl _bar_alias
32 _bar_alias = _bar
34 // CHECK: Name: {{_?}}foo
35 // CHECK-NEXT: Value: [[FOO_VALUE:.*$]]
36 // CHECK-NEXT: Section: [[FOO_SECTION_NUMBER:.*$]]
37 // CHECK-NEXT: BaseType: [[FOO_SIMPLE_TYPE:.*$]]
38 // CHECK-NEXT: ComplexType: [[FOO_COMPLEX_TYPE:.*$]]
39 // CHECK-NEXT: StorageClass: [[FOO_STORAGE_CLASS:.*$]]
40 // CHECK-NEXT: AuxSymbolCount: [[FOO_NUMBER_OF_AUX_SYMBOLS:.*$]]
42 // CHECK: Name: {{_?}}bar
43 // CHECK-NEXT: Value: [[BAR_VALUE:.*$]]
44 // CHECK-NEXT: Section: [[BAR_SECTION_NUMBER:.*$]]
45 // CHECK-NEXT: BaseType: [[BAR_SIMPLE_TYPE:.*$]]
46 // CHECK-NEXT: ComplexType: [[BAR_COMPLEX_TYPE:.*$]]
47 // CHECK-NEXT: StorageClass: [[BAR_STORAGE_CLASS:.*$]]
48 // CHECK-NEXT: AuxSymbolCount: [[BAR_NUMBER_OF_AUX_SYMBOLS:.*$]]
50 // CHECK: Name: {{_?}}foo_alias
51 // CHECK-NEXT: Value: [[FOO_VALUE]]
52 // CHECK-NEXT: Section: [[FOO_SECTION_NUMBER]]
53 // CHECK-NEXT: BaseType: [[FOO_SIMPLE_TYPE]]
54 // CHECK-NEXT: ComplexType: Null (0x0)
55 // CHECK-NEXT: StorageClass: [[FOO_STORAGE_CLASS]]
56 // CHECK-NEXT: AuxSymbolCount: [[FOO_NUMBER_OF_AUX_SYMBOLS]]
58 // CHECK: Name: {{_?}}bar_alias_alias
59 // CHECK-NEXT: Value: [[BAR_VALUE]]
60 // CHECK-NEXT: Section: [[BAR_SECTION_NUMBER]]
61 // CHECK-NEXT: BaseType: [[BAR_SIMPLE_TYPE]]
62 // CHECK-NEXT: ComplexType: [[BAR_COMPLEX_TYPE]]
63 // CHECK-NEXT: StorageClass: [[BAR_STORAGE_CLASS]]
64 // CHECK-NEXT: AuxSymbolCount: [[BAR_NUMBER_OF_AUX_SYMBOLS]]
66 // CHECK: Name: {{_?}}bar_alias
67 // CHECK-NEXT: Value: [[BAR_VALUE]]
68 // CHECK-NEXT: Section: [[BAR_SECTION_NUMBER]]
69 // CHECK-NEXT: BaseType: [[BAR_SIMPLE_TYPE]]
70 // CHECK-NEXT: ComplexType: [[BAR_COMPLEX_TYPE]]
71 // CHECK-NEXT: StorageClass: [[BAR_STORAGE_CLASS]]
72 // CHECK-NEXT: AuxSymbolCount: [[BAR_NUMBER_OF_AUX_SYMBOLS]]