1; RUN: opt -S -name-anon-globals < %s | FileCheck %s
2; RUN: opt -prepare-for-thinlto -O0 -module-summary -o %t.bc -enable-new-pm=0 < %s
3; RUN: opt -passes='thinlto-pre-link<O0>,require<module-summary>' -o %t.bc < %s
4
5
6; foo contribute to the unique hash for the module
7define void @foo() {
8    ret void
9}
10
11; bar is internal, and does not contribute to the unique hash for the module
12define internal void @bar() {
13    ret void
14}
15
16; CHECK: @anon.acbd18db4cc2f85cedef654fccc4a4d8.3 = global i8 0
17; CHECK: @anon.acbd18db4cc2f85cedef654fccc4a4d8.4 = alias i8, i8* @anon.acbd18db4cc2f85cedef654fccc4a4d8.3
18; CHECK: define void @anon.acbd18db4cc2f85cedef654fccc4a4d8.0()
19; CHECK: define void @anon.acbd18db4cc2f85cedef654fccc4a4d8.1()
20; CHECK: define void @anon.acbd18db4cc2f85cedef654fccc4a4d8.2()
21
22define void @0() {
23    ret void
24}
25define void @1() {
26    ret void
27}
28define void @2() {
29    ret void
30}
31
32
33@3 = global i8 0
34
35@4 = alias i8, i8 *@3
36