1 ; RUN: opt < %s -globalopt -S | FileCheck %s
3 @foo1 = alias void (), void ()* @foo2
4 ; CHECK: @foo1 = alias void (), void ()* @bar2
6 @foo2 = alias void(), void()* @bar1
7 ; CHECK: @foo2 = alias void (), void ()* @bar2
9 @bar1 = alias void (), void ()* @bar2
10 ; CHECK: @bar1 = alias void (), void ()* @bar2
12 @weak1 = weak alias void (), void ()* @bar2
13 ; CHECK: @weak1 = weak alias void (), void ()* @bar2
15 @bar4 = private unnamed_addr constant [2 x i8*] zeroinitializer
16 @foo4 = weak_odr unnamed_addr alias i8*, getelementptr inbounds ([2 x i8*], [2 x i8*]* @bar4, i32 0, i32 1)
17 ; CHECK: @foo4 = weak_odr unnamed_addr alias i8*, getelementptr inbounds ([2 x i8*], [2 x i8*]* @bar4, i32 0, i32 1)
19 @priva = private alias void (), void ()* @bar5
20 ; CHECK: @priva = private alias void (), void ()* @bar5
25 ; CHECK: define void @bar2()
27 define weak void @bar5() {
30 ; CHECK: define weak void @bar5()
35 ; CHECK: call void @bar2()
38 ; CHECK: call void @bar2()
41 ; CHECK: call void @bar2()
44 ; CHECK: call void @weak1()
47 ; CHECK: call void @priva()
52 @foo3 = alias void (), void ()* @bar3
55 define internal void @bar3() {
58 ;CHECK: define void @foo3