1 ; This test is checking basic properties of -print-module-scope options:
2 ; - dumps all the module IR at once
3 ; - all the function attributes are shown, including those of declarations
4 ; - works on top of -print-after and -filter-print-funcs
6 ; RUN: opt < %s 2>&1 -disable-output \
7 ; RUN: -simplifycfg -print-after=simplifycfg -print-module-scope \
8 ; RUN: | FileCheck %s -check-prefix=CFG
9 ; RUN: opt < %s 2>&1 -disable-output \
10 ; RUN: -simplifycfg -print-after=simplifycfg -filter-print-funcs=foo -print-module-scope \
11 ; RUN: | FileCheck %s -check-prefix=FOO
14 ; CFG-SAME: function: foo
15 ; CFG-NEXT: ModuleID =
16 ; CFG: define void @foo
17 ; CFG: define void @bar
18 ; CFG: declare void @baz
20 ; CFG-SAME: function: bar
21 ; CFG-NEXT: ModuleID =
22 ; CFG: define void @foo
23 ; CFG: define void @bar
24 ; CFG: declare void @baz
27 ; FOO-NOT: function: bar
28 ; FOO-SAME: function: foo
29 ; FOO-NEXT: ModuleID =
30 ; FOO: Function Attrs: nounwind ssp
31 ; FOO: define void @foo
32 ; FOO: Function Attrs: nounwind
33 ; FOO: define void @bar
34 ; FOO: Function Attrs: nounwind readnone ssp
35 ; FOO: declare void @baz
37 define void @foo() nounwind ssp {
42 define void @bar() #0 {
46 declare void @baz() #1
48 attributes #0 = { nounwind "no-frame-pointer-elim"="true" }
50 attributes #1 = { nounwind readnone ssp "use-soft-float"="false" }
51 ; FOO: attributes #{{[0-9]}} = { nounwind "no-frame-pointer-elim"="true" }
53 ; FOO: attributes #{{[0-9]}} = { nounwind readnone ssp "use-soft-float"="false" }