Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / fseparate-named-sections.c
blob7a247dbd085cbe40448acf2afdee2f559e6ba943
1 // REQUIRES: x86-registered-target
3 // RUN: %clang_cc1 -triple x86_64-pc-linux -S -o - < %s | FileCheck %s
4 // RUN: %clang_cc1 -triple x86_64-pc-linux -S -fseparate-named-sections -o - < %s | FileCheck %s --check-prefix=SEPARATE
6 __attribute__((section("custom_text"))) void f(void) {}
7 __attribute__((section("custom_text"))) void g(void) {}
9 // CHECK: .section custom_text,"ax",@progbits{{$}}
10 // CHECK: f:
11 // CHECK: g:
13 // SEPARATE: .section custom_text,"ax",@progbits,unique,1{{$}}
14 // SEPARATE: f:
15 // SEPARATE: .section custom_text,"ax",@progbits,unique,2{{$}}
16 // SEPARATE: g:
18 __attribute__((section("custom_data"))) int i = 0;
19 __attribute__((section("custom_data"))) int j = 0;
21 // CHECK: .section custom_data,"aw",@progbits{{$}}
22 // CHECK: i:
23 // CHECK: j:
25 // SEPARATE: .section custom_data,"aw",@progbits,unique,3{{$}}
26 // SEPARATE: i:
27 // SEPARATE: .section custom_data,"aw",@progbits,unique,4{{$}}
28 // SEPARATE: j: