2 ; RUN: llvm-as %s -o %t.o
3 ; RUN: ld.lld %t.o -o %t --lto-basic-block-sections=labels --lto-O0 2>&1 | FileCheck -check-prefix=LABELSWARN %s
4 ; RUN: ld.lld %t.o -o %t --lto-basic-block-sections=all --lto-O0 --save-temps
5 ; RUN: llvm-readobj -s %t.lto.o | FileCheck --check-prefix=SECNAMES %s
6 ; RUN: ld.lld %t.o -o %t --lto-basic-block-sections=all --lto-unique-basic-block-section-names --lto-O0 --save-temps
7 ; RUN: llvm-readobj -s %t.lto.o | FileCheck --check-prefix=SECNAMES-FULL %s
8 ; RUN: llvm-nm %t | FileCheck --check-prefix=SYMS %s
10 ; LABELSWARN: --lto-basic-block-sections=labels' is deprecated; Please use '--lto-basic-block-address-map' instead
12 ; SECNAMES: Name: .text.foo {{.*}}
13 ; SECNAMES: Name: .text.foo {{.*}}
14 ; SECNAMES: Name: .text.foo {{.*}}
16 ; SECNAMES-FULL: Name: .text.foo {{.*}}
17 ; SECNAMES-FULL: Name: .text.foo.foo.__part.1 {{.*}}
18 ; SECNAMES-FULL: Name: .text.foo.foo.__part.2 {{.*}}
24 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
25 target triple = "x86_64-unknown-linux-gnu"
27 ; Function Attrs: nounwind uwtable
28 define dso_local void @foo(i32 %b) local_unnamed_addr {
30 %tobool.not = icmp eq i32 %b, 0
31 br i1 %tobool.not, label %if.end, label %if.then
33 if.then: ; preds = %entry
34 tail call void @foo(i32 0)
37 if.end: ; preds = %entry, %if.then
41 define void @_start() {