blob: 5464c37e9e58fb2a8d4325abc050576615681a45 [file] [log] [blame]
Devang Patel23c4b312008-05-14 20:01:01 +00001; No arguments means internalize all but main
Dan Gohman5bb7c7c2009-09-08 22:34:10 +00002; RUN: opt %s -internalize -S | grep internal | count 4
Devang Patel23c4b312008-05-14 20:01:01 +00003; Internalize all but foo and j
Dan Gohman5bb7c7c2009-09-08 22:34:10 +00004; RUN: opt %s -internalize -internalize-public-api-list foo -internalize-public-api-list j -S | grep internal | count 3
Devang Patel23c4b312008-05-14 20:01:01 +00005; Non existent files should be treated as if they were empty (so internalize all but main)
Dan Gohman5bb7c7c2009-09-08 22:34:10 +00006; RUN: opt %s -internalize -internalize-public-api-file /nonexistent/file 2> /dev/null -S | grep internal | count 4
7; RUN: opt %s -internalize -internalize-public-api-list bar -internalize-public-api-list foo -internalize-public-api-file /nonexistent/file 2> /dev/null -S | grep internal | count 3
Devang Patel23c4b312008-05-14 20:01:01 +00008; -file and -list options should be merged, the .apifile contains foo and j
Dan Gohman5bb7c7c2009-09-08 22:34:10 +00009; RUN: opt %s -internalize -internalize-public-api-list bar -internalize-public-api-file %s.apifile -S | grep internal | count 2
Devang Patel23c4b312008-05-14 20:01:01 +000010
11@i = weak global i32 0 ; <i32*> [#uses=0]
12@j = weak global i32 0 ; <i32*> [#uses=0]
13
14define void @main(...) {
15entry:
16 ret void
17}
18
19define void @foo(...) {
20entry:
21 ret void
22}
23
24define void @bar(...) {
25entry:
26 ret void
27}