1 // RUN: %clang_cc1 -triple x86_64-linux -emit-llvm -o - %s | FileCheck %s --check-prefix=LLVM
2 // RUN: %clang_cc1 -triple x86_64-linux -S -o - %s | FileCheck %s --check-prefix=ASM
3 // Actually, any ELF target would do
4 // REQUIRES: x86-registered-target
6 #pragma clang section bss = "B$$" data = "d@t@" rodata = "r0d@t@"
9 const int *f() { return &a
; }
20 // LLVM: @_ZL1a = internal constant i32 1, align 4 #[[#A:]]
21 // LLVM: @_ZL1b = internal global i32 0, align 4 #[[#A]]
22 // LLVM: @c = {{.*}}global i32 2, align 4 #[[#A]]
23 // LLVM: @d = {{.*}}global i32 0, align 4 #[[#A]]
24 // LLVM: @e = {{.*}}global i32 0, align 4 #[[#A]]
26 // LLVM: attributes #[[#A]] = { "bss-section"="B$$" "data-section"="d@t@" "rodata-section"="r0d@t@" }
28 // ASM: .section "r0d@t@","a",@progbits
33 // ASM: .section "B$$","aw",@nobits
38 // ASM: .section "d@t@","aw",@progbits
43 // ASM: .section "B$$","aw",@nobits