35 lines · plain
1; RUN: opt -S -passes=name-anon-globals %s | FileCheck %s2; RUN: opt -passes='thinlto-pre-link<O0>,require<module-summary>' -o %t.bc < %s3 4 5; foo contribute to the unique hash for the module6define void @foo() {7 ret void8}9 10; bar is internal, and does not contribute to the unique hash for the module11define internal void @bar() {12 ret void13}14 15; CHECK: @anon.acbd18db4cc2f85cedef654fccc4a4d8.3 = global i8 016; CHECK: @anon.acbd18db4cc2f85cedef654fccc4a4d8.4 = alias i8, ptr @anon.acbd18db4cc2f85cedef654fccc4a4d8.317; CHECK: define void @anon.acbd18db4cc2f85cedef654fccc4a4d8.0()18; CHECK: define void @anon.acbd18db4cc2f85cedef654fccc4a4d8.1()19; CHECK: define void @anon.acbd18db4cc2f85cedef654fccc4a4d8.2()20 21define void @0() {22 ret void23}24define void @1() {25 ret void26}27define void @2() {28 ret void29}30 31 32@3 = global i8 033 34@4 = alias i8, ptr @335