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)
22 ; CHECK: define void @bar2()
27 ; CHECK: call void @bar2()
30 ; CHECK: call void @bar2()
33 ; CHECK: call void @bar2()
36 ; CHECK: call void @weak1()
40 @foo3 = alias void (), void ()* @bar3
43 define internal void @bar3() {
46 ;CHECK: define void @foo3