From 2421572dd918205857581bb7fdff224078216586 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 4 Sep 2013 19:19:32 +0000 Subject: 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 --- .../Internalize/2008-05-09-AllButMain.ll | 55 ---------------------- .../Internalize/2008-05-09-AllButMain.ll.apifile | 2 - test/Transforms/Internalize/apifile | 2 + .../Transforms/Internalize/available_externally.ll | 16 ------- test/Transforms/Internalize/lists.ll | 50 ++++++++++++++++++++ 5 files changed, 52 insertions(+), 73 deletions(-) delete mode 100644 test/Transforms/Internalize/2008-05-09-AllButMain.ll delete mode 100644 test/Transforms/Internalize/2008-05-09-AllButMain.ll.apifile create mode 100644 test/Transforms/Internalize/apifile delete mode 100644 test/Transforms/Internalize/available_externally.ll create mode 100644 test/Transforms/Internalize/lists.ll diff --git a/test/Transforms/Internalize/2008-05-09-AllButMain.ll b/test/Transforms/Internalize/2008-05-09-AllButMain.ll deleted file mode 100644 index f75e80d4c8..0000000000 --- a/test/Transforms/Internalize/2008-05-09-AllButMain.ll +++ /dev/null @@ -1,55 +0,0 @@ -; No arguments means internalize everything -; RUN: opt < %s -internalize -S | FileCheck --check-prefix=NOARGS %s - -; Internalize all but foo and j -; RUN: opt < %s -internalize -internalize-public-api-list foo -internalize-public-api-list j -S | FileCheck --check-prefix=LIST %s - -; Non existent files should be treated as if they were empty (so internalize -; everything) -; RUN: opt < %s -internalize -internalize-public-api-file /nonexistent/file 2> /dev/null -S | FileCheck --check-prefix=EMPTYFILE %s - -; 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 - -; -file and -list options should be merged, the .apifile contains foo and j -; RUN: opt < %s -internalize -internalize-public-api-list bar -internalize-public-api-file %s.apifile -S | FileCheck --check-prefix=MERGE %s - -; NOARGS: @i = internal global -; LIST: @i = internal global -; EMPTYFILE: @i = internal global -; LIST2: @i = internal global -; MERGE: @i = internal global -@i = global i32 0 - -; NOARGS: @j = internal global -; LIST: @j = global -; EMPTYFILE: @j = internal global -; LIST2: @j = internal global -; MERGE: @j = global -@j = global i32 0 - -; NOARGS-LABEL: define internal void @main( -; LIST-LABEL: define internal void @main( -; EMPTYFILE-LABEL: define internal void @main( -; LIST2-LABEL: define internal void @main( -; MERGE-LABEL: define internal void @main( -define void @main() { - ret void -} - -; NOARGS-LABEL: define internal void @foo( -; LIST-LABEL: define void @foo( -; EMPTYFILE-LABEL: define internal void @foo( -; LIST2-LABEL: define void @foo( -; MERGE-LABEL: define void @foo( -define void @foo() { - ret void -} - -; NOARGS-LABEL: define internal void @bar( -; LIST-LABEL: define internal void @bar( -; EMPTYFILE-LABEL: define internal void @bar( -; LIST2-LABEL: define void @bar( -; MERGE-LABEL: define void @bar( -define void @bar() { - ret void -} diff --git a/test/Transforms/Internalize/2008-05-09-AllButMain.ll.apifile b/test/Transforms/Internalize/2008-05-09-AllButMain.ll.apifile deleted file mode 100644 index f6c58b80c1..0000000000 --- a/test/Transforms/Internalize/2008-05-09-AllButMain.ll.apifile +++ /dev/null @@ -1,2 +0,0 @@ -foo -j diff --git a/test/Transforms/Internalize/apifile b/test/Transforms/Internalize/apifile new file mode 100644 index 0000000000..f6c58b80c1 --- /dev/null +++ b/test/Transforms/Internalize/apifile @@ -0,0 +1,2 @@ +foo +j diff --git a/test/Transforms/Internalize/available_externally.ll b/test/Transforms/Internalize/available_externally.ll deleted file mode 100644 index bb8960384a..0000000000 --- a/test/Transforms/Internalize/available_externally.ll +++ /dev/null @@ -1,16 +0,0 @@ -; RUN: opt < %s -internalize -internalize-public-api-list foo -S | FileCheck %s - -; CHECK-LABEL: define void @foo( -define void @foo() { - ret void -} - -; CHECK-LABEL: define internal void @zed( -define void @zed() { - ret void -} - -; CHECK-LABEL: define available_externally void @bar( -define available_externally void @bar() { - ret void -} diff --git a/test/Transforms/Internalize/lists.ll b/test/Transforms/Internalize/lists.ll new file mode 100644 index 0000000000..83e441a2df --- /dev/null +++ b/test/Transforms/Internalize/lists.ll @@ -0,0 +1,50 @@ +; No arguments means internalize everything +; RUN: opt < %s -internalize -S | FileCheck --check-prefix=ALL %s + +; Non existent files should be treated as if they were empty (so internalize +; everything) +; RUN: opt < %s -internalize -internalize-public-api-file /nonexistent/file 2> /dev/null -S | FileCheck --check-prefix=ALL %s + +; Internalize all but foo and j +; RUN: opt < %s -internalize -internalize-public-api-list foo -internalize-public-api-list j -S | FileCheck --check-prefix=FOO_AND_J %s + +; 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 + +; -file and -list options should be merged, the apifile contains foo and j +; RUN: opt < %s -internalize -internalize-public-api-list bar -internalize-public-api-file %S/apifile -S | FileCheck --check-prefix=FOO_J_AND_BAR %s + +; ALL: @i = internal global +; FOO_AND_J: @i = internal global +; FOO_AND_BAR: @i = internal global +; FOO_J_AND_BAR: @i = internal global +@i = global i32 0 + +; ALL: @j = internal global +; FOO_AND_J: @j = global +; FOO_AND_BAR: @j = internal global +; FOO_J_AND_BAR: @j = global +@j = global i32 0 + +; ALL: define internal void @main() { +; FOO_AND_J: define internal void @main() { +; FOO_AND_BAR: define internal void @main() { +; FOO_J_AND_BAR: define internal void @main() { +define void @main() { + ret void +} + +; ALL: define internal void @foo() { +; FOO_AND_J: define void @foo() { +; FOO_AND_BAR: define void @foo() { +; FOO_J_AND_BAR: define void @foo() { +define void @foo() { + ret void +} + +; ALL: define available_externally void @bar() { +; FOO_AND_J: define available_externally void @bar() { +; FOO_AND_BAR: define available_externally void @bar() { +; FOO_J_AND_BAR: define available_externally void @bar() { +define available_externally void @bar() { + ret void +} -- cgit v1.2.3