xref: /aosp_15_r20/external/llvm/test/Transforms/NameAnonFunctions/rename.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: opt -S -name-anon-functions < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; foo contribute to the unique hash for the module
5*9880d681SAndroid Build Coastguard Workerdefine void @foo() {
6*9880d681SAndroid Build Coastguard Worker    ret void
7*9880d681SAndroid Build Coastguard Worker}
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Worker; bar is internal, and does not contribute to the unique hash for the module
10*9880d681SAndroid Build Coastguard Workerdefine internal void @bar() {
11*9880d681SAndroid Build Coastguard Worker    ret void
12*9880d681SAndroid Build Coastguard Worker}
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker; CHECK: define void @anon.acbd18db4cc2f85cedef654fccc4a4d8.0()
15*9880d681SAndroid Build Coastguard Worker; CHECK: define void @anon.acbd18db4cc2f85cedef654fccc4a4d8.1()
16*9880d681SAndroid Build Coastguard Worker; CHECK: define void @anon.acbd18db4cc2f85cedef654fccc4a4d8.2()
17*9880d681SAndroid Build Coastguard Worker
18*9880d681SAndroid Build Coastguard Workerdefine void @0() {
19*9880d681SAndroid Build Coastguard Worker    ret void
20*9880d681SAndroid Build Coastguard Worker}
21*9880d681SAndroid Build Coastguard Workerdefine void @1() {
22*9880d681SAndroid Build Coastguard Worker    ret void
23*9880d681SAndroid Build Coastguard Worker}
24*9880d681SAndroid Build Coastguard Workerdefine void @2() {
25*9880d681SAndroid Build Coastguard Worker    ret void
26*9880d681SAndroid Build Coastguard Worker}
27*9880d681SAndroid Build Coastguard Worker
28