File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -62,15 +62,16 @@ static lto::Config createConfig(Ctx &ctx) {
62
62
c.Options .DataSections = true ;
63
63
64
64
// Check if basic block sections must be used.
65
- // Allowed values for --lto-basic-block-sections are "all", "labels",
65
+ // Allowed values for --lto-basic-block-sections are "all",
66
66
// "<file name specifying basic block ids>", or none. This is the equivalent
67
67
// of -fbasic-block-sections= flag in clang.
68
68
if (!ctx.arg .ltoBasicBlockSections .empty ()) {
69
69
if (ctx.arg .ltoBasicBlockSections == " all" ) {
70
70
c.Options .BBSections = BasicBlockSection::All;
71
71
} else if (ctx.arg .ltoBasicBlockSections == " labels" ) {
72
72
c.Options .BBAddrMap = true ;
73
- c.Options .BBSections = BasicBlockSection::None;
73
+ warn (" '--lto-basic-block-sections=labels' is deprecated; Please use "
74
+ " '--lto-basic-block-address-map' instead" );
74
75
} else if (ctx.arg .ltoBasicBlockSections == " none" ) {
75
76
c.Options .BBSections = BasicBlockSection::None;
76
77
} else {
Original file line number Diff line number Diff line change 1
1
; REQUIRES: x86
2
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
3
4
; RUN: ld.lld %t.o -o %t --lto-basic-block-sections=all --lto-O0 --save-temps
4
5
; RUN: llvm-readobj -s %t.lto.o | FileCheck --check-prefix=SECNAMES %s
5
6
; RUN: ld.lld %t.o -o %t --lto-basic-block-sections=all --lto-unique-basic-block-section-names --lto-O0 --save-temps
6
7
; RUN: llvm-readobj -s %t.lto.o | FileCheck --check-prefix=SECNAMES-FULL %s
7
8
; RUN: llvm-nm %t | FileCheck --check-prefix=SYMS %s
8
9
10
+ ; LABELSWARN: --lto-basic-block-sections=labels' is deprecated; Please use '--lto-basic-block-address-map' instead
11
+
9
12
; SECNAMES: Name: .text.foo {{.*}}
10
13
; SECNAMES: Name: .text.foo {{.*}}
11
14
; SECNAMES: Name: .text.foo {{.*}}
You can’t perform that action at this time.
0 commit comments