| ; Test that global values with explicit sections are placed into unique sections. |
| ; RUN: llc < %s | FileCheck %s |
| ; RUN: llc -separate-named-sections < %s | FileCheck %s --check-prefix=SEPARATE |
| target triple="x86_64-unknown-unknown-elf" |
| define i32 @f() section "custom_text" { |
| define i32 @g() section "custom_text" { |
| ; CHECK: .section custom_text,"ax",@progbits{{$}} |
| ; SEPARATE: .section custom_text,"ax",@progbits,unique,1{{$}} |
| ; SEPARATE: .section custom_text,"ax",@progbits,unique,2{{$}} |
| @i = global i32 0, section "custom_data", align 8 |
| @j = global i32 0, section "custom_data", align 8 |
| ; CHECK: .section custom_data,"aw",@progbits{{$}} |
| ; SEPARATE: .section custom_data,"aw",@progbits,unique,3{{$}} |
| ; SEPARATE: .section custom_data,"aw",@progbits,unique,4{{$}} |