summaryrefslogtreecommitdiff
path: root/test/Transforms/NameAnonFunctions/rename.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/NameAnonFunctions/rename.ll')
-rw-r--r--test/Transforms/NameAnonFunctions/rename.ll27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/Transforms/NameAnonFunctions/rename.ll b/test/Transforms/NameAnonFunctions/rename.ll
new file mode 100644
index 0000000000000..851746f7a979c
--- /dev/null
+++ b/test/Transforms/NameAnonFunctions/rename.ll
@@ -0,0 +1,27 @@
+; RUN: opt -S -name-anon-functions < %s | FileCheck %s
+
+
+; foo contribute to the unique hash for the module
+define void @foo() {
+ ret void
+}
+
+; bar is internal, and does not contribute to the unique hash for the module
+define internal void @bar() {
+ ret void
+}
+
+; CHECK: define void @anon.acbd18db4cc2f85cedef654fccc4a4d8.0()
+; CHECK: define void @anon.acbd18db4cc2f85cedef654fccc4a4d8.1()
+; CHECK: define void @anon.acbd18db4cc2f85cedef654fccc4a4d8.2()
+
+define void @0() {
+ ret void
+}
+define void @1() {
+ ret void
+}
+define void @2() {
+ ret void
+}
+