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