|
| 1 | +; RUN: llc -mtriple x86_64-linux-gnu -data-sections %s -o - | FileCheck %s --check-prefix=ELF |
| 2 | +; RUN: llc -mtriple x86_64-linux-gnu -unique-section-names=0 -data-sections %s -o - | FileCheck %s --check-prefix=ELF-NOUNIQ |
| 3 | + |
| 4 | +; RUN: llc -mtriple x86_64-windows-msvc -data-sections %s -o - | FileCheck %s --check-prefix=COFF-MSVC |
| 5 | + |
| 6 | +; ELF: .section .data.hot.foo, |
| 7 | +; ELF: .section .data.bar, |
| 8 | +; ELF: .section .bss.unlikely.baz, |
| 9 | +; ELF: .section .bss.quz, |
| 10 | + |
| 11 | +; ELF-NOUNIQ: .section .data.hot.,"aw",@progbits,unique,1 |
| 12 | +; ELF-NOUNIQ: .section .data,"aw",@progbits,unique,2 |
| 13 | +; ELF-NOUNIQ: .section .bss.unlikely.,"aw",@nobits,unique,3 |
| 14 | +; ELF-NOUNIQ: .section .bss,"aw",@nobits,unique,4 |
| 15 | + |
| 16 | +; COFF-MSVC: .section .data,"dw",one_only,foo |
| 17 | +; COFF-MSVC: .section .data,"dw",one_only,bar |
| 18 | +; COFF-MSVC: .section .bss,"bw",one_only,baz |
| 19 | +; COFF-MSVC: .section .bss,"bw",one_only,quz |
| 20 | + |
| 21 | +@foo = global i32 1, !section_prefix !0 |
| 22 | +@bar = global i32 2 |
| 23 | +@baz = global i32 0, !section_prefix !1 |
| 24 | +@quz = global i32 0 |
| 25 | + |
| 26 | +!0 = !{!"section_prefix", !"hot"} |
| 27 | +!1 = !{!"section_prefix", !"unlikely"} |
0 commit comments