1 // REQUIRES: x86-registered-target 2 3 // RUN: %clang_cc1 -triple x86_64 -S -o - < %s | FileCheck %s --check-prefix=PLAIN 4 // RUN: %clang_cc1 -triple x86_64 -S -fbasic-block-sections=all -fbasic-block-sections=none -o - < %s | FileCheck %s --check-prefix=PLAIN 5 6 // RUN: %clang_cc1 -triple x86_64 -S -fbasic-block-sections=all -o - < %s | FileCheck %s --check-prefix=BB_WORLD --check-prefix=BB_ALL 7 // RUN: %clang_cc1 -triple x86_64 -S -fbasic-block-sections=list=%S/Inputs/basic-block-sections.funcnames -o - < %s | FileCheck %s --check-prefix=BB_WORLD --check-prefix=BB_LIST 8 // RUN: %clang_cc1 -triple x86_64 -S -fbasic-block-sections=all -funique-basic-block-section-names -o - < %s | FileCheck %s --check-prefix=UNIQUE 9 10 int world(int a) { 11 if (a > 10) 12 return 10; 13 else if (a > 5) 14 return 5; 15 else 16 return 0; 17 } 18 19 int another(int a) { 20 if (a > 10) 21 return 20; 22 return 0; 23 } 24 25 // PLAIN-NOT: section 26 // PLAIN: world: 27 // 28 // BB_WORLD: .section .text.world,"ax",@progbits{{$}} 29 // BB_WORLD: world: 30 // BB_WORLD: .section .text.world,"ax",@progbits,unique 31 // BB_WORLD: world.1: 32 // BB_WORLD: .section .text.another,"ax",@progbits 33 // BB_ALL: .section .text.another,"ax",@progbits,unique 34 // BB_ALL: another.1: 35 // BB_LIST-NOT: .section .text.another,"ax",@progbits,unique 36 // BB_LIST: another: 37 // BB_LIST-NOT: another.1: 38 // 39 // UNIQUE: .section .text.world.world.1, 40 // UNIQUE: .section .text.another.another.1, 41