llvm.org GIT mirror llvm / 2421572
Merge these 2 tests in a single file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189975 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 6 years ago
5 changed file(s) with 52 addition(s) and 73 deletion(s). Raw diff Collapse all Expand all
+0
-55
test/Transforms/Internalize/2008-05-09-AllButMain.ll less more
None ; No arguments means internalize everything
1 ; RUN: opt < %s -internalize -S | FileCheck --check-prefix=NOARGS %s
2
3 ; Internalize all but foo and j
4 ; RUN: opt < %s -internalize -internalize-public-api-list foo -internalize-public-api-list j -S | FileCheck --check-prefix=LIST %s
5
6 ; Non existent files should be treated as if they were empty (so internalize
7 ; everything)
8 ; RUN: opt < %s -internalize -internalize-public-api-file /nonexistent/file 2> /dev/null -S | FileCheck --check-prefix=EMPTYFILE %s
9
10 ; RUN: opt < %s -S -internalize -internalize-public-api-list bar -internalize-public-api-list foo -internalize-public-api-file /nonexistent/file 2> /dev/null | FileCheck --check-prefix=LIST2 %s
11
12 ; -file and -list options should be merged, the .apifile contains foo and j
13 ; RUN: opt < %s -internalize -internalize-public-api-list bar -internalize-public-api-file %s.apifile -S | FileCheck --check-prefix=MERGE %s
14
15 ; NOARGS: @i = internal global
16 ; LIST: @i = internal global
17 ; EMPTYFILE: @i = internal global
18 ; LIST2: @i = internal global
19 ; MERGE: @i = internal global
20 @i = global i32 0
21
22 ; NOARGS: @j = internal global
23 ; LIST: @j = global
24 ; EMPTYFILE: @j = internal global
25 ; LIST2: @j = internal global
26 ; MERGE: @j = global
27 @j = global i32 0
28
29 ; NOARGS-LABEL: define internal void @main(
30 ; LIST-LABEL: define internal void @main(
31 ; EMPTYFILE-LABEL: define internal void @main(
32 ; LIST2-LABEL: define internal void @main(
33 ; MERGE-LABEL: define internal void @main(
34 define void @main() {
35 ret void
36 }
37
38 ; NOARGS-LABEL: define internal void @foo(
39 ; LIST-LABEL: define void @foo(
40 ; EMPTYFILE-LABEL: define internal void @foo(
41 ; LIST2-LABEL: define void @foo(
42 ; MERGE-LABEL: define void @foo(
43 define void @foo() {
44 ret void
45 }
46
47 ; NOARGS-LABEL: define internal void @bar(
48 ; LIST-LABEL: define internal void @bar(
49 ; EMPTYFILE-LABEL: define internal void @bar(
50 ; LIST2-LABEL: define void @bar(
51 ; MERGE-LABEL: define void @bar(
52 define void @bar() {
53 ret void
54 }
+0
-2
test/Transforms/Internalize/2008-05-09-AllButMain.ll.apifile less more
None foo
1 j
+0
-16
test/Transforms/Internalize/available_externally.ll less more
None ; RUN: opt < %s -internalize -internalize-public-api-list foo -S | FileCheck %s
1
2 ; CHECK-LABEL: define void @foo(
3 define void @foo() {
4 ret void
5 }
6
7 ; CHECK-LABEL: define internal void @zed(
8 define void @zed() {
9 ret void
10 }
11
12 ; CHECK-LABEL: define available_externally void @bar(
13 define available_externally void @bar() {
14 ret void
15 }
0 ; No arguments means internalize everything
1 ; RUN: opt < %s -internalize -S | FileCheck --check-prefix=ALL %s
2
3 ; Non existent files should be treated as if they were empty (so internalize
4 ; everything)
5 ; RUN: opt < %s -internalize -internalize-public-api-file /nonexistent/file 2> /dev/null -S | FileCheck --check-prefix=ALL %s
6
7 ; Internalize all but foo and j
8 ; RUN: opt < %s -internalize -internalize-public-api-list foo -internalize-public-api-list j -S | FileCheck --check-prefix=FOO_AND_J %s
9
10 ; RUN: opt < %s -S -internalize -internalize-public-api-list bar -internalize-public-api-list foo -internalize-public-api-file /nonexistent/file 2> /dev/null | FileCheck --check-prefix=FOO_AND_BAR %s
11
12 ; -file and -list options should be merged, the apifile contains foo and j
13 ; RUN: opt < %s -internalize -internalize-public-api-list bar -internalize-public-api-file %S/apifile -S | FileCheck --check-prefix=FOO_J_AND_BAR %s
14
15 ; ALL: @i = internal global
16 ; FOO_AND_J: @i = internal global
17 ; FOO_AND_BAR: @i = internal global
18 ; FOO_J_AND_BAR: @i = internal global
19 @i = global i32 0
20
21 ; ALL: @j = internal global
22 ; FOO_AND_J: @j = global
23 ; FOO_AND_BAR: @j = internal global
24 ; FOO_J_AND_BAR: @j = global
25 @j = global i32 0
26
27 ; ALL: define internal void @main() {
28 ; FOO_AND_J: define internal void @main() {
29 ; FOO_AND_BAR: define internal void @main() {
30 ; FOO_J_AND_BAR: define internal void @main() {
31 define void @main() {
32 ret void
33 }
34
35 ; ALL: define internal void @foo() {
36 ; FOO_AND_J: define void @foo() {
37 ; FOO_AND_BAR: define void @foo() {
38 ; FOO_J_AND_BAR: define void @foo() {
39 define void @foo() {
40 ret void
41 }
42
43 ; ALL: define available_externally void @bar() {
44 ; FOO_AND_J: define available_externally void @bar() {
45 ; FOO_AND_BAR: define available_externally void @bar() {
46 ; FOO_J_AND_BAR: define available_externally void @bar() {
47 define available_externally void @bar() {
48 ret void
49 }