annotate test/ThinLTO/X86/section.ll @ 121:803732b1fca8

LLVM 5.0
author kono
date Fri, 27 Oct 2017 17:07:41 +0900
parents 1172e4bd9c6f
children c2174574ed3a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
120
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
1 ; Do setup work for all below tests: generate bitcode and combined index
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
2 ; RUN: opt -module-summary %s -o %t.bc
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
3 ; RUN: opt -module-summary %p/Inputs/section.ll -o %t2.bc
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
4 ; RUN: llvm-lto -thinlto-action=thinlink -o %t3.bc %t.bc %t2.bc
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
5
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
6 ; Check that we don't promote 'var_with_section'
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
7 ; RUN: llvm-lto -thinlto-action=promote %t2.bc -thinlto-index=%t3.bc -o - | llvm-dis -o - | FileCheck %s --check-prefix=PROMOTE
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
8 ; PROMOTE: @var_with_section = internal global i32 0, section "some_section"
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
9
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
10 ; RUN: llvm-lto -thinlto-action=import %t.bc -thinlto-index=%t3.bc -o - | llvm-dis -o - | FileCheck %s --check-prefix=IMPORT
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
11 ; Check that section prevent import of @reference_gv_with_section.
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
12 ; IMPORT: declare void @reference_gv_with_section()
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
13 ; Canary to check that importing is correctly set up.
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
14 ; IMPORT: define available_externally void @foo()
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
15
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
16
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
17 define i32 @main() {
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
18 call void @reference_gv_with_section()
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
19 call void @foo()
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
20 ret i32 42
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
21 }
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
22
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
23
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
24 declare void @reference_gv_with_section()
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
25 declare void @foo()