summaryrefslogtreecommitdiff
path: root/test/Transforms/NameAnonFunctions/rename.ll
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:41:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:41:05 +0000
commit01095a5d43bbfde13731688ddcf6048ebb8b7721 (patch)
tree4def12e759965de927d963ac65840d663ef9d1ea /test/Transforms/NameAnonFunctions/rename.ll
parentf0f4822ed4b66e3579e92a89f368f8fb860e218e (diff)
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
+}
+