1; Check the basic block sections labels option 2; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=true -basic-block-sections=labels | FileCheck %s --check-prefix=UNIQ 3; RUN: llc < %s -mtriple=x86_64 -function-sections -unique-section-names=false -basic-block-sections=labels | FileCheck %s --check-prefix=NOUNIQ 4 5define void @_Z3bazb(i1 zeroext) personality i32 (...)* @__gxx_personality_v0 { 6 br i1 %0, label %2, label %7 7 82: 9 %3 = invoke i32 @_Z3barv() 10 to label %7 unwind label %5 11 br label %9 12 135: 14 landingpad { i8*, i32 } 15 catch i8* null 16 br label %9 17 187: 19 %8 = call i32 @_Z3foov() 20 br label %9 21 229: 23 ret void 24} 25 26declare i32 @_Z3barv() #1 27 28declare i32 @_Z3foov() #1 29 30declare i32 @__gxx_personality_v0(...) 31 32; UNIQ: .section .text._Z3bazb,"ax",@progbits{{$}} 33; NOUNIQ: .section .text,"ax",@progbits,unique,1 34; CHECK-LABEL: _Z3bazb: 35; CHECK-LABEL: .Lfunc_begin0: 36; CHECK-LABEL: .LBB_END0_0: 37; CHECK-LABEL: .LBB0_1: 38; CHECK-LABEL: .LBB_END0_1: 39; CHECK-LABEL: .LBB0_2: 40; CHECK-LABEL: .LBB_END0_2: 41; CHECK-LABEL: .LBB0_3: 42; CHECK-LABEL: .LBB_END0_3: 43; CHECK-LABEL: .Lfunc_end0: 44 45; UNIQ: .section .llvm_bb_addr_map,"o",@llvm_bb_addr_map,.text._Z3bazb{{$}} 46;; Verify that with -unique-section-names=false, the unique id of the text section gets assigned to the llvm_bb_addr_map section. 47; NOUNIQ: .section .llvm_bb_addr_map,"o",@llvm_bb_addr_map,.text,unique,1 48; CHECK-NEXT: .quad .Lfunc_begin0 49; CHECK-NEXT: .byte 4 50; CHECK-NEXT: .uleb128 .Lfunc_begin0-.Lfunc_begin0 51; CHECK-NEXT: .uleb128 .LBB_END0_0-.Lfunc_begin0 52; CHECK-NEXT: .byte 0 53; CHECK-NEXT: .uleb128 .LBB0_1-.Lfunc_begin0 54; CHECK-NEXT: .uleb128 .LBB_END0_1-.LBB0_1 55; CHECK-NEXT: .byte 0 56; CHECK-NEXT: .uleb128 .LBB0_2-.Lfunc_begin0 57; CHECK-NEXT: .uleb128 .LBB_END0_2-.LBB0_2 58; CHECK-NEXT: .byte 1 59; CHECK-NEXT: .uleb128 .LBB0_3-.Lfunc_begin0 60; CHECK-NEXT: .uleb128 .LBB_END0_3-.LBB0_3 61; CHECK-NEXT: .byte 5 62