Index: clang/test/CodeGen/basic-block-sections.c =================================================================== --- clang/test/CodeGen/basic-block-sections.c +++ clang/test/CodeGen/basic-block-sections.c @@ -31,14 +31,14 @@ // BB_WORLD: .section .text.world,"ax",@progbits{{$}} // BB_WORLD: world: // BB_WORLD: .section .text.world,"ax",@progbits,unique -// BB_WORLD: world.1: +// BB_WORLD: world.__part.1: // BB_WORLD: .section .text.another,"ax",@progbits // BB_ALL: .section .text.another,"ax",@progbits,unique -// BB_ALL: another.1: +// BB_ALL: another.__part.1: // BB_LIST-NOT: .section .text.another,"ax",@progbits,unique // BB_LIST: another: -// BB_LIST-NOT: another.1: +// BB_LIST-NOT: another.__part.1: // -// UNIQUE: .section .text.world.world.1, -// UNIQUE: .section .text.another.another.1, +// UNIQUE: .section .text.world.world.__part.1, +// UNIQUE: .section .text.another.another.__part.1, // ERROR: error: unable to load basic block sections function list: '{{[Nn]}}o such file or directory' Index: lld/test/ELF/lto/basic-block-sections.ll =================================================================== --- lld/test/ELF/lto/basic-block-sections.ll +++ lld/test/ELF/lto/basic-block-sections.ll @@ -11,12 +11,12 @@ ; SECNAMES: Name: .text.foo {{.*}} ; SECNAMES-FULL: Name: .text.foo {{.*}} -; SECNAMES-FULL: Name: .text.foo.foo.1 {{.*}} -; SECNAMES-FULL: Name: .text.foo.foo.2 {{.*}} +; SECNAMES-FULL: Name: .text.foo.foo.__part.1 {{.*}} +; SECNAMES-FULL: Name: .text.foo.foo.__part.2 {{.*}} ; SYMS: foo -; SYMS: foo.1 -; SYMS: foo.2 +; SYMS: foo.__part.1 +; SYMS: foo.__part.2 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" Index: llvm/lib/CodeGen/MachineBasicBlock.cpp =================================================================== --- llvm/lib/CodeGen/MachineBasicBlock.cpp +++ llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -71,7 +71,10 @@ } else if (SectionID == MBBSectionID::ExceptionSectionID) { Suffix += ".eh"; } else { - Suffix += "." + std::to_string(SectionID.Number); + // For symbols that represent basic block sections, we add ".__part." to + // allow tools like symbolizers to know that this represents a part of + // the original function. + Suffix = (Suffix + Twine(".__part.") + Twine(SectionID.Number)).str(); } CachedMCSymbol = Ctx.getOrCreateSymbol(MF->getName() + Suffix); } else { Index: llvm/test/CodeGen/X86/basic-block-sections-blockaddress-taken.ll =================================================================== --- llvm/test/CodeGen/X86/basic-block-sections-blockaddress-taken.ll +++ llvm/test/CodeGen/X86/basic-block-sections-blockaddress-taken.ll @@ -18,7 +18,7 @@ ret void ; CHECK: .section .text,"ax",@progbits,unique,1 ; CHECK-NEXT: .Ltmp0: -; CHECK-NEXT: foo.1 +; CHECK-NEXT: foo.__part.1 ; CHECK-NEXT: callq bar ; @@ -27,7 +27,7 @@ ret void ; CHECK: .section .text,"ax",@progbits,unique,2 ; CHECK-NEXT: .Ltmp1: -; CHECK-NEXT: foo.2 +; CHECK-NEXT: foo.__part.2 ; CHECK-NEXT: callq baz } Index: llvm/test/CodeGen/X86/basic-block-sections-clusters-branches.ll =================================================================== --- llvm/test/CodeGen/X86/basic-block-sections-clusters-branches.ll +++ llvm/test/CodeGen/X86/basic-block-sections-clusters-branches.ll @@ -43,23 +43,23 @@ ; LINUX-SECTIONS1: .section .text.foo,"ax",@progbits ; LINUX-SECTIONS1-LABEL: foo: -; LINUX-SECTIONS1: jne foo.1 +; LINUX-SECTIONS1: jne foo.__part.1 ; LINUX-SECTIONS1-NOT: {{jne|je|jmp}} ; LINUX-SECTIONS1-LABEL: # %bb.2: ; LINUX-SECTIONS1: jmp foo.cold ; LINUX-SECTIONS1: .section .text.foo,"ax",@progbits,unique,1 -; LINUX-SECTIONS1-LABEL: foo.1: +; LINUX-SECTIONS1-LABEL: foo.__part.1: ; LINUX-SECTIONS1: jmp foo.cold ; LINUX-SECTIONS1: .section .text.split.foo,"ax",@progbits ; LINUX-SECTIONS1-LABEL: foo.cold: ; LINUX-SECTIONS2: .section .text.foo,"ax",@progbits ; LINUX-SECTIONS2-LABEL: foo: -; LINUX-SECTIONS2: jne foo.0 +; LINUX-SECTIONS2: jne foo.__part.0 ; LINUX-SECTIONS2-NOT: {{jne|je|jmp}} ; LINUX-SECTIONS2-LABEL: # %bb.2: ; LINUX-SECTIONS2: jmp .LBB0_3 ; LINUX-SECTIONS2: .section .text.foo,"ax",@progbits,unique,1 -; LINUX-SECTIONS2: foo.0: +; LINUX-SECTIONS2: foo.__part.0: ; LINUX-SECTIONS2-NOT: {{jne|je|jmp}} ; LINUX-SECTIONS2: .LBB0_3: Index: llvm/test/CodeGen/X86/basic-block-sections-clusters-eh.ll =================================================================== --- llvm/test/CodeGen/X86/basic-block-sections-clusters-eh.ll +++ llvm/test/CodeGen/X86/basic-block-sections-clusters-eh.ll @@ -60,7 +60,7 @@ ; LINUX-SECTIONS1-NOT: .section ; LINUX-SECTIONS1-LABEL: .LBB0_6: ; LINUX-SECTIONS1: .section .text.main,"ax",@progbits,unique,1 -; LINUX-SECTIONS1-LABEL: main.0: +; LINUX-SECTIONS1-LABEL: main.__part.0: ; LINUX-SECTIONS1: .section .text.eh.main,"ax",@progbits ; LINUX-SECTIONS1-LABEL: main.eh: ; LINUX-SECTIONS1-NOT: .section @@ -79,7 +79,7 @@ ; LINUX-SECTIONS2-NOT: .section ; LINUX-SECTIONS2-LABEL: .LBB0_6: ; LINUX-SECTIONS2: .section .text.main,"ax",@progbits,unique,1 -; LINUX-SECTIONS2-LABEL: main.0: +; LINUX-SECTIONS2-LABEL: main.__part.0: ; LINUX-SECTIONS2-NOT: .section ; LINUX-SECTIONS2-LABEL: .LBB0_2: ; LINUX-SECTIONS2-NOT: .section Index: llvm/test/CodeGen/X86/basic-block-sections-clusters.ll =================================================================== --- llvm/test/CodeGen/X86/basic-block-sections-clusters.ll +++ llvm/test/CodeGen/X86/basic-block-sections-clusters.ll @@ -46,9 +46,9 @@ ; LINUX-SECTIONS1-LABEL: # %bb.2: ; LINUX-SECTIONS1-NOT: .LBB_END0_{{0-9}}+ ; LINUX-SECTIONS1: .section .text.foo,"ax",@progbits,unique,1 -; LINUX-SECTIONS1-LABEL: foo.1: +; LINUX-SECTIONS1-LABEL: foo.__part.1: ; LINUX-SECTIONS1-LABEL: .LBB_END0_1: -; LINUX-SECTIONS1-NEXT: .size foo.1, .LBB_END0_1-foo.1 +; LINUX-SECTIONS1-NEXT: .size foo.__part.1, .LBB_END0_1-foo.__part.1 ; LINUX-SECTIONS1-NOT: .section ; LINUX-SECTIONS1: .section .text.split.foo,"ax",@progbits ; LINUX-SECTIONS1-LABEL: foo.cold: @@ -66,12 +66,12 @@ ; LINUX-SECTIONS2-LABEL: # %bb.2: ; LINUX-SECTIONS2-NOT: .LBB_END0_{{0-9}}+ ; LINUX-SECTIONS2: .section .text.foo,"ax",@progbits,unique,1 -; LINUX-SECTIONS2-NEXT: foo.0: +; LINUX-SECTIONS2-NEXT: foo.__part.0: ; LINUX-SECTIONS2-NOT: .LBB_END0_{{0-9}}+ ; LINUX-SECTIONS2-NOT: .section ; LINUX-SECTIONS2-LABEL: .LBB0_3: ; LINUX-SECTIONS2-LABEL: .LBB_END0_3: -; LINUX-SECTIONS2-NEXT: .size foo.0, .LBB_END0_3-foo.0 +; LINUX-SECTIONS2-NEXT: .size foo.__part.0, .LBB_END0_3-foo.__part.0 ; LINUX-SECTIONS2: .section .text.foo,"ax",@progbits ; LINUX-SECTIONS2-NOT: .LBB_END0_{{0-9}}+ ; LINUX-SECTIONS2-LABEL: .Lfunc_end0: Index: llvm/test/CodeGen/X86/basic-block-sections-directjumps.ll =================================================================== --- llvm/test/CodeGen/X86/basic-block-sections-directjumps.ll +++ llvm/test/CodeGen/X86/basic-block-sections-directjumps.ll @@ -29,10 +29,10 @@ ; LINUX-SECTIONS: .section .text._Z3bazb,"ax",@progbits ; LINUX-SECTIONS: _Z3bazb: -; LINUX-SECTIONS: jmp _Z3bazb.1 -; LINUX-SECTIONS: .section .text._Z3bazb._Z3bazb.1,"ax",@progbits -; LINUX-SECTIONS: _Z3bazb.1: -; LINUX-SECTIONS: jmp _Z3bazb.2 -; LINUX-SECTIONS: .section .text._Z3bazb._Z3bazb.2,"ax",@progbits -; LINUX-SECTIONS: _Z3bazb.2: -; LINUX-SECTIONS: jmp _Z3bazb.3 +; LINUX-SECTIONS: jmp _Z3bazb.__part.1 +; LINUX-SECTIONS: .section .text._Z3bazb._Z3bazb.__part.1,"ax",@progbits +; LINUX-SECTIONS: _Z3bazb.__part.1: +; LINUX-SECTIONS: jmp _Z3bazb.__part.2 +; LINUX-SECTIONS: .section .text._Z3bazb._Z3bazb.__part.2,"ax",@progbits +; LINUX-SECTIONS: _Z3bazb.__part.2: +; LINUX-SECTIONS: jmp _Z3bazb.__part.3 Index: llvm/test/CodeGen/X86/basic-block-sections-eh.ll =================================================================== --- llvm/test/CodeGen/X86/basic-block-sections-eh.ll +++ llvm/test/CodeGen/X86/basic-block-sections-eh.ll @@ -80,6 +80,6 @@ ;LINUX-SECTIONS: .section .text._Z3foob,"ax",@progbits ;LINUX-SECTIONS: _Z3foob: -;LINUX-SECTIONS: .section .text._Z3foob._Z3foob.{{[0-9]+}},"ax",@progbits -;LINUX-SECTIONS-LABEL: _Z3foob.{{[0-9]+}}: +;LINUX-SECTIONS: .section .text._Z3foob._Z3foob.__part.{{[0-9]+}},"ax",@progbits +;LINUX-SECTIONS-LABEL: _Z3foob.__part.{{[0-9]+}}: ;LINUX-SECTIONS: calll __cxa_begin_catch Index: llvm/test/CodeGen/X86/basic-block-sections-list.ll =================================================================== --- llvm/test/CodeGen/X86/basic-block-sections-list.ll +++ llvm/test/CodeGen/X86/basic-block-sections-list.ll @@ -59,14 +59,14 @@ ; LINUX-SECTIONS: .section .text._Z3foob,"ax",@progbits ; LINUX-SECTIONS: _Z3foob: -; LINUX-SECTIONS: .section .text._Z3foob._Z3foob.1,"ax",@progbits -; LINUX-SECTIONS: _Z3foob.1: -; LINUX-SECTIONS: .section .text._Z3foob._Z3foob.2,"ax",@progbits -; LINUX-SECTIONS: _Z3foob.2: -; LINUX-SECTIONS: .section .text._Z3foob._Z3foob.3,"ax",@progbits -; LINUX-SECTIONS: _Z3foob.3: +; LINUX-SECTIONS: .section .text._Z3foob._Z3foob.__part.1,"ax",@progbits +; LINUX-SECTIONS: _Z3foob.__part.1: +; LINUX-SECTIONS: .section .text._Z3foob._Z3foob.__part.2,"ax",@progbits +; LINUX-SECTIONS: _Z3foob.__part.2: +; LINUX-SECTIONS: .section .text._Z3foob._Z3foob.__part.3,"ax",@progbits +; LINUX-SECTIONS: _Z3foob.__part.3: ; LINUX-SECTIONS: .section .text._Z3zipb,"ax",@progbits ; LINUX-SECTIONS: _Z3zipb: -; LINUX-SECTIONS-NOT: .section .text._Z3zipb._Z3zipb.{{[0-9]+}},"ax",@progbits -; LINUX-SECTIONS-NOT: _Z3zipb.{{[0-9]+}}: +; LINUX-SECTIONS-NOT: .section .text._Z3zipb._Z3zipb.__part.{{[0-9]+}},"ax",@progbits +; LINUX-SECTIONS-NOT: _Z3zipb.__part.{{[0-9]+}}: Index: llvm/test/CodeGen/X86/basic-block-sections-listbb.ll =================================================================== --- llvm/test/CodeGen/X86/basic-block-sections-listbb.ll +++ llvm/test/CodeGen/X86/basic-block-sections-listbb.ll @@ -33,10 +33,10 @@ ; LINUX-SECTIONS: .section .text._Z3bazb,"ax",@progbits ; LINUX-SECTIONS: _Z3bazb: ; Check that the basic block with id 1 doesn't get a section. -; LINUX-SECTIONS-NOT: .section .text._Z3bazb._Z3bazb.{{[0-9]+}},"ax",@progbits +; LINUX-SECTIONS-NOT: .section .text._Z3bazb._Z3bazb.__part.{{[0-9]+}},"ax",@progbits ; LINUX-SECTIONS-LABEL: # %bb.1: ; LINUX-SECTIONS-NEXT: callq _Z3barv -; LINUX-SECTIONS: .section .text._Z3bazb.[[SECTION_LABEL:_Z3bazb.[0-9]+]],"ax",@progbits +; LINUX-SECTIONS: .section .text._Z3bazb.[[SECTION_LABEL:_Z3bazb.__part.[0-9]+]],"ax",@progbits ; LINUX-SECTIONS-NEXT: [[SECTION_LABEL]]: ; LINUX-SECTIONS-NEXT: callq _Z3foov ; LINUX-SECTIONS: .LBB_END0_2: Index: llvm/test/CodeGen/X86/basic-block-sections-mir-parse.mir =================================================================== --- llvm/test/CodeGen/X86/basic-block-sections-mir-parse.mir +++ llvm/test/CodeGen/X86/basic-block-sections-mir-parse.mir @@ -124,8 +124,8 @@ # CHECK: _Z3foob: # CHECK: .section .text,"ax",@progbits,unique -# CHECK: _Z3foob.1: +# CHECK: _Z3foob.__part.1: # CHECK: .section .text,"ax",@progbits,unique -# CHECK: _Z3foob.2: +# CHECK: _Z3foob.__part.2: # CHECK: .section .text,"ax",@progbits,unique -# CHECK: _Z3foob.3: +# CHECK: _Z3foob.__part.3: Index: llvm/test/CodeGen/X86/basic-block-sections-unreachable.ll =================================================================== --- llvm/test/CodeGen/X86/basic-block-sections-unreachable.ll +++ llvm/test/CodeGen/X86/basic-block-sections-unreachable.ll @@ -14,5 +14,5 @@ unreachable ; CHECK-NOSECTIONS: # %bb.2: # %default ; CHECK-SECTIONS: .section .text,"ax",@progbits,unique,2 -; CHECK-SECTIONS-NEXT: foo.2: # %default +; CHECK-SECTIONS-NEXT: foo.__part.2: # %default } Index: llvm/test/CodeGen/X86/basic-block-sections.ll =================================================================== --- llvm/test/CodeGen/X86/basic-block-sections.ll +++ llvm/test/CodeGen/X86/basic-block-sections.ll @@ -28,11 +28,11 @@ ; LINUX-SECTIONS: .section .text._Z3bazb,"ax",@progbits ; LINUX-SECTIONS: _Z3bazb: -; LINUX-SECTIONS: .section .text._Z3bazb._Z3bazb.1,"ax",@progbits -; LINUX-SECTIONS: _Z3bazb.1: +; LINUX-SECTIONS: .section .text._Z3bazb.[[SECTION_LABEL_1:_Z3bazb.__part.[0-9]+]],"ax",@progbits +; LINUX-SECTIONS: [[SECTION_LABEL_1]]: ; LINUX-SECTIONS: .LBB_END0_1: -; LINUX-SECTIONS-NEXT: .size _Z3bazb.1, .LBB_END0_1-_Z3bazb.1 -; LINUX-SECTIONS: .section .text._Z3bazb._Z3bazb.2,"ax",@progbits -; LINUX-SECTIONS: _Z3bazb.2: +; LINUX-SECTIONS-NEXT: .size [[SECTION_LABEL_1]], .LBB_END0_1-[[SECTION_LABEL_1]] +; LINUX-SECTIONS: .section .text._Z3bazb.[[SECTION_LABEL_2:_Z3bazb.__part.[0-9]+]],"ax",@progbits +; LINUX-SECTIONS: [[SECTION_LABEL_2]]: ; LINUX-SECTIONS: .LBB_END0_2: -; LINUX-SECTIONS-NEXT: .size _Z3bazb.2, .LBB_END0_2-_Z3bazb.2 +; LINUX-SECTIONS-NEXT: .size [[SECTION_LABEL_2]], .LBB_END0_2-[[SECTION_LABEL_2]] Index: llvm/test/CodeGen/X86/basic-block-sections_2.ll =================================================================== --- /dev/null +++ llvm/test/CodeGen/X86/basic-block-sections_2.ll @@ -0,0 +1,61 @@ +; Check that the basic block sections suffix naming does not conflict with __cxx_global_var_init.N naming. +; How to generate this file: +;; class A { +;; public: +;; A(bool a) { } +;; }; +;; +;; extern bool bar(int); +;; A g_a(bar(5) ? bar(3) : false), g_b(true); +;; +;; $ clang -O1 -emit-llvm -S +;; +; __cxx_global_var_init has multiple basic blocks which will produce many sections. +; RUN: llc < %s -mtriple=x86_64-pc-linux -function-sections -basic-block-sections=all -unique-basic-block-section-names | FileCheck %s + +; CHECK-LABEL: __cxx_global_var_init: +; CHECK-LABEL: __cxx_global_var_init.__part.1: +; CHECK-LABEL: __cxx_global_var_init.1: + +%class.A = type { i8 } + +$_ZN1AC2Eb = comdat any + +@g_a = dso_local global %class.A zeroinitializer, align 1 +@g_b = dso_local global %class.A zeroinitializer, align 1 +@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_symcollision.cc, i8* null }] + +define internal fastcc void @__cxx_global_var_init() unnamed_addr section ".text.startup" { +entry: + %call = call zeroext i1 @_Z3bari(i32 5) + br i1 %call, label %cond.true, label %cond.end + +cond.true: ; preds = %entry + %call1 = call zeroext i1 @_Z3bari(i32 3) + br label %cond.end + +cond.end: ; preds = %entry, %cond.true + %cond = phi i1 [ %call1, %cond.true ], [ false, %entry ] + call void @_ZN1AC2Eb(%class.A* nonnull @g_a, i1 zeroext %cond) + ret void +} + +declare dso_local zeroext i1 @_Z3bari(i32) local_unnamed_addr + +define linkonce_odr dso_local void @_ZN1AC2Eb(%class.A* %this, i1 zeroext %a) unnamed_addr comdat align 2 { +entry: + ret void +} + +define internal fastcc void @__cxx_global_var_init.1() unnamed_addr section ".text.startup" { +entry: + call void @_ZN1AC2Eb(%class.A* nonnull @g_b, i1 zeroext true) + ret void +} + +define internal void @_GLOBAL__sub_I_symcollision.cc() section ".text.startup" { +entry: + call fastcc void @__cxx_global_var_init() + call fastcc void @__cxx_global_var_init.1() + ret void +} Index: llvm/test/CodeGen/X86/cfi-basic-block-sections-1.ll =================================================================== --- llvm/test/CodeGen/X86/cfi-basic-block-sections-1.ll +++ llvm/test/CodeGen/X86/cfi-basic-block-sections-1.ll @@ -16,13 +16,13 @@ ; SECTIONS_CFI: .cfi_def_cfa_register %rbp ; SECTIONS_CFI: .cfi_endproc -; SECTIONS_CFI: _Z2f3b.1: +; SECTIONS_CFI: _Z2f3b.__part.1: ; SECTIONS_CFI-NEXT: .cfi_startproc ; SECTIONS_CFI-NEXT: .cfi_def_cfa %rbp, 16 ; SECTIONS_CFI-NEXT: .cfi_offset %rbp, -16 ; SECTIONS_CFI: .cfi_endproc -; SECTIONS_CFI: _Z2f3b.2: +; SECTIONS_CFI: _Z2f3b.__part.2: ; SECTIONS_CFI-NEXT: .cfi_startproc ; SECTIONS_CFI-NEXT: .cfi_def_cfa %rbp, 16 ; SECTIONS_CFI-NEXT: .cfi_offset %rbp, -16 @@ -35,12 +35,12 @@ ; SECTIONS_NOFP_CFI: .cfi_def_cfa_offset 16 ; SECTIONS_NOFP_CFI: .cfi_endproc -; SECTIONS_NOFP_CFI: _Z2f3b.1: +; SECTIONS_NOFP_CFI: _Z2f3b.__part.1: ; SECTIONS_NOFP_CFI-NEXT: .cfi_startproc ; SECTIONS_NOFP_CFI-NEXT: .cfi_def_cfa %rsp, 16 ; SECTIONS_NOFP_CFI: .cfi_endproc -; SECTIONS_NOFP_CFI: _Z2f3b.2: +; SECTIONS_NOFP_CFI: _Z2f3b.__part.2: ; SECTIONS_NOFP_CFI-NEXT: .cfi_startproc ; SECTIONS_NOFP_CFI-NEXT: .cfi_def_cfa %rsp, 16 ; SECTIONS_NOFP_CFI: .cfi_endproc Index: llvm/test/CodeGen/X86/cfi-inserter-basic-block-sections-callee-save-registers.ll =================================================================== --- llvm/test/CodeGen/X86/cfi-inserter-basic-block-sections-callee-save-registers.ll +++ llvm/test/CodeGen/X86/cfi-inserter-basic-block-sections-callee-save-registers.ll @@ -10,7 +10,7 @@ ; SECTIONS_CFI-NEXT: .cfi_offset [[RD:%r.+]], -32 ; SECTIONS_CFI-NEXT: .cfi_offset [[RE:%r.+]], -24 -; SECTIONS_CFI: _Z3foob.1: +; SECTIONS_CFI: _Z3foob.__part.1: ; SECTIONS_CFI: .cfi_offset %rbp, -16 ; SECTIONS_CFI: .cfi_offset [[RA]], -56 ; SECTIONS_CFI-NEXT: .cfi_offset [[RB]], -48 @@ -18,7 +18,7 @@ ; SECTIONS_CFI-NEXT: .cfi_offset [[RD]], -32 ; SECTIONS_CFI-NEXT: .cfi_offset [[RE]], -24 -; SECTIONS_CFI: _Z3foob.2: +; SECTIONS_CFI: _Z3foob.__part.2: ; SECTIONS_CFI: .cfi_offset %rbp, -16 ; SECTIONS_CFI: .cfi_offset [[RA]], -56 ; SECTIONS_CFI-NEXT: .cfi_offset [[RB]], -48 Index: llvm/test/CodeGen/X86/gcc_except_table_bb_sections.ll =================================================================== --- llvm/test/CodeGen/X86/gcc_except_table_bb_sections.ll +++ llvm/test/CodeGen/X86/gcc_except_table_bb_sections.ll @@ -27,7 +27,7 @@ ; CHECK-NOT: .cfi_lsda -; CHECK-LABEL: main.1: +; CHECK-LABEL: main.__part.1: ; CHECK-NEXT: .cfi_startproc ; CHECK-NON-PIC-NEXT: .cfi_personality 3, __gxx_personality_v0 @@ -38,7 +38,7 @@ ; CHECK-NOT: .cfi_lsda -; CHECK-LABEL: main.2: +; CHECK-LABEL: main.__part.2: ; CHECK-NEXT: .cfi_startproc ; CHECK-NON-PIC-NEXT: .cfi_personality 3, __gxx_personality_v0 @@ -82,12 +82,12 @@ ;; Verify @LPStart encoding for NON-PIC mode. ; CHECK-NON-PIC-NEXT: .byte 0 # @LPStart Encoding = absptr -; CHECK-NON-PIC-NEXT: .quad main.2 +; CHECK-NON-PIC-NEXT: .quad main.__part.2 ;; Verify @LPStart encoding for PIC mode. ; CHECK-PIC-NEXT: .byte 16 # @LPStart Encoding = pcrel ; CHECK-PIC-NEXT: [[DOT:\.Ltmp[0-9]+]]: -; CHECK-PIC-NEXT: .quad main.2-[[DOT]] +; CHECK-PIC-NEXT: .quad main.__part.2-[[DOT]] ;; Verify @TType encoding for NON-PIC mode. ; CHECK-NON-PIC-NEXT: .byte 3 # @TType Encoding = udata4 @@ -102,17 +102,17 @@ ; CHECK-NEXT: .Lcst_begin0: ; CHECK-NEXT: .uleb128 .Ltmp0-.Lfunc_begin0 # >> Call Site 1 << ; CHECK-NEXT: .uleb128 .Ltmp1-.Ltmp0 # Call between .Ltmp0 and .Ltmp1 -; CHECK-NEXT: .uleb128 .Ltmp2-main.2 # jumps to .Ltmp2 +; CHECK-NEXT: .uleb128 .Ltmp2-main.__part.2 # jumps to .Ltmp2 ; CHECK-NEXT: .byte 3 # On action: 2 ; CHECK-NEXT: .p2align 2 ; CHECK-NEXT: .Lexception1: ; CHECK-NON-PIC-NEXT: .byte 0 # @LPStart Encoding = absptr -; CHECK-NON-PIC-NEXT: .quad main.2 +; CHECK-NON-PIC-NEXT: .quad main.__part.2 ; CHECK-PIC-NEXT: .byte 16 # @LPStart Encoding = pcrel ; CHECK-PIC-NEXT: [[DOT:\.Ltmp[0-9]+]]: -; CHECK-PIC-NEXT: .quad main.2-[[DOT]] +; CHECK-PIC-NEXT: .quad main.__part.2-[[DOT]] ; CHECK-NON-PIC-NEXT: .byte 3 # @TType Encoding = udata4 @@ -127,11 +127,11 @@ ; CHECK-NEXT: .Lexception2: ; CHECK-NON-PIC-NEXT: .byte 0 # @LPStart Encoding = absptr -; CHECK-NON-PIC-NEXT: .quad main.2 +; CHECK-NON-PIC-NEXT: .quad main.__part.2 ; CHECK-PIC-NEXT: .byte 16 # @LPStart Encoding = pcrel ; CHECK-PIC-NEXT: [[DOT:\.Ltmp[0-9]+]]: -; CHECK-PIC-NEXT: .quad main.2-[[DOT]] +; CHECK-PIC-NEXT: .quad main.__part.2-[[DOT]] ; CHECK-NON-PIC-NEXT: .byte 3 # @TType Encoding = udata4 @@ -142,8 +142,8 @@ ; CHECK-NEXT: .byte 1 # Call site Encoding = uleb128 ; CHECK-NEXT: .uleb128 .Laction_table_base0-.Lcst_begin2 ; CHECK-NEXT: .Lcst_begin2: -; CHECK-NEXT: .uleb128 main.2-main.2 # >> Call Site 2 << -; CHECK-NEXT: .uleb128 .LBB_END0_2-main.2 # Call between main.2 and .LBB_END0_2 +; CHECK-NEXT: .uleb128 main.__part.2-main.__part.2 # >> Call Site 2 << +; CHECK-NEXT: .uleb128 .LBB_END0_2-main.__part.2 # Call between main.__part.2 and .LBB_END0_2 ; CHECK-NEXT: .byte 0 # has no landing pad ; CHECK-NEXT: .byte 0 # On action: cleanup ; CHECK-NEXT: .Laction_table_base0: Index: llvm/test/DebugInfo/X86/basic-block-sections_1.ll =================================================================== --- llvm/test/DebugInfo/X86/basic-block-sections_1.ll +++ llvm/test/DebugInfo/X86/basic-block-sections_1.ll @@ -16,33 +16,33 @@ ; NO-SECTIONS: DW_AT_high_pc [DW_FORM_data4] ({{.*}}) ; BB-SECTIONS: DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000) ; BB-SECTIONS-NEXT: DW_AT_ranges [DW_FORM_sec_offset] -; BB-SECTIONS-NEXT: [{{.*}}) ".text._Z3fooi.1" -; BB-SECTIONS-NEXT: [{{.*}}) ".text._Z3fooi.2" -; BB-SECTIONS-NEXT: [{{.*}}) ".text._Z3fooi.3" +; BB-SECTIONS-NEXT: [{{.*}}) ".text._Z3fooi.__part.1" +; BB-SECTIONS-NEXT: [{{.*}}) ".text._Z3fooi.__part.2" +; BB-SECTIONS-NEXT: [{{.*}}) ".text._Z3fooi.__part.3" ; BB-SECTIONS-NEXT: [{{.*}}) ".text" ; BB-SECTIONS-ASM: _Z3fooi: ; BB-SECTIONS-ASM: .Ltmp{{[0-9]+}}: ; BB-SECTIONS-ASM-NEXT: .loc 1 2 9 prologue_end ; BB-SECTIONS-ASM: .Ltmp{{[0-9]+}}: ; BB-SECTIONS-ASM-NEXT: .loc 1 2 7 is_stmt -; BB-SECTIONS-ASM: _Z3fooi.1: +; BB-SECTIONS-ASM: _Z3fooi.__part.1: ; BB-SECTIONS-ASM: .LBB_END0_{{[0-9]+}}: -; BB-SECTIONS-ASM: .size _Z3fooi.1, .LBB_END0_{{[0-9]+}}-_Z3fooi.1 -; BB-SECTIONS-ASM: _Z3fooi.2: +; BB-SECTIONS-ASM: .size _Z3fooi.__part.1, .LBB_END0_{{[0-9]+}}-_Z3fooi.__part.1 +; BB-SECTIONS-ASM: _Z3fooi.__part.2: ; BB-SECTIONS-ASM: .Ltmp{{[0-9]+}}: ; BB-SECTIONS-ASM-NEXT: .LBB_END0_{{[0-9]+}}: -; BB-SECTIONS-ASM: .size _Z3fooi.2, .LBB_END0_{{[0-9]+}}-_Z3fooi.2 -; BB-SECTIONS-ASM: _Z3fooi.3: +; BB-SECTIONS-ASM: .size _Z3fooi.__part.2, .LBB_END0_{{[0-9]+}}-_Z3fooi.__part.2 +; BB-SECTIONS-ASM: _Z3fooi.__part.3: ; BB-SECTIONS-ASM: .Ltmp{{[0-9]+}}: ; BB-SECTIONS-ASM-NEXT: .LBB_END0_{{[0-9]+}}: -; BB-SECTIONS-ASM: .size _Z3fooi.3, .LBB_END0_{{[0-9]+}}-_Z3fooi.3 +; BB-SECTIONS-ASM: .size _Z3fooi.__part.3, .LBB_END0_{{[0-9]+}}-_Z3fooi.__part.3 ; BB-SECTIONS-ASM: .Lfunc_end0: ; BB-SECTIONS-ASM: .Ldebug_ranges0: -; BB-SECTIONS-ASM-NEXT: .quad _Z3fooi.1 +; BB-SECTIONS-ASM-NEXT: .quad _Z3fooi.__part.1 ; BB-SECTIONS-ASM-NEXT: .quad .LBB_END0_{{[0-9]+}} -; BB-SECTIONS-ASM-NEXT: .quad _Z3fooi.2 +; BB-SECTIONS-ASM-NEXT: .quad _Z3fooi.__part.2 ; BB-SECTIONS-ASM-NEXT: .quad .LBB_END0_{{[0-9]+}} -; BB-SECTIONS-ASM-NEXT: .quad _Z3fooi.3 +; BB-SECTIONS-ASM-NEXT: .quad _Z3fooi.__part.3 ; BB-SECTIONS-ASM-NEXT: .quad .LBB_END0_{{[0-9]+}} ; BB-SECTIONS-ASM-NEXT: .quad .Lfunc_begin0 ; BB-SECTIONS-ASM-NEXT: .quad .Lfunc_end0