mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
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
This commit is contained in:
parent
1bfa80359e
commit
2421572dd9
@ -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
|
||||
}
|
@ -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
|
||||
}
|
50
test/Transforms/Internalize/lists.ll
Normal file
50
test/Transforms/Internalize/lists.ll
Normal file
@ -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
|
||||
}
|
Loading…
Reference in New Issue
Block a user