brintos

brintos / llvm-project-archived public Read only

0
0
Text · 918 B · 7a247db Raw
29 lines · c
1// REQUIRES: x86-registered-target2 3// RUN: %clang_cc1 -triple x86_64-pc-linux -S -o - < %s | FileCheck %s4// RUN: %clang_cc1 -triple x86_64-pc-linux -S -fseparate-named-sections -o - < %s | FileCheck %s --check-prefix=SEPARATE5 6__attribute__((section("custom_text"))) void f(void) {}7__attribute__((section("custom_text"))) void g(void) {}8 9// CHECK: .section custom_text,"ax",@progbits{{$}}10// CHECK: f:11// CHECK: g:12 13// SEPARATE: .section custom_text,"ax",@progbits,unique,1{{$}}14// SEPARATE: f:15// SEPARATE: .section custom_text,"ax",@progbits,unique,2{{$}}16// SEPARATE: g:17 18__attribute__((section("custom_data"))) int i = 0;19__attribute__((section("custom_data"))) int j = 0;20 21// CHECK: .section custom_data,"aw",@progbits{{$}}22// CHECK: i:23// CHECK: j:24 25// SEPARATE: .section custom_data,"aw",@progbits,unique,3{{$}}26// SEPARATE: i:27// SEPARATE: .section custom_data,"aw",@progbits,unique,4{{$}}28// SEPARATE: j:29