summaryrefslogtreecommitdiffstats
path: root/test/Transforms/GlobalOpt/2009-02-15-ResolveAlias.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/GlobalOpt/2009-02-15-ResolveAlias.ll')
-rw-r--r--test/Transforms/GlobalOpt/2009-02-15-ResolveAlias.ll24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/Transforms/GlobalOpt/2009-02-15-ResolveAlias.ll b/test/Transforms/GlobalOpt/2009-02-15-ResolveAlias.ll
new file mode 100644
index 0000000..a5be2b1
--- /dev/null
+++ b/test/Transforms/GlobalOpt/2009-02-15-ResolveAlias.ll
@@ -0,0 +1,24 @@
+; RUN: opt < %s -globalopt -S | FileCheck %s
+
+define internal void @f() {
+; CHECK-NOT: @f
+; CHECK: define void @a
+ ret void
+}
+
+@a = alias void ()* @f
+
+define void @g() {
+ call void()* @a()
+ ret void
+}
+
+@b = alias internal void ()* @g
+; CHECK-NOT: @b
+
+define void @h() {
+ call void()* @b()
+; CHECK: call void @g
+ ret void
+}
+