2014-02-13 02:18:36 +00:00
|
|
|
; RUN: opt < %s -globalopt -S | FileCheck %s
|
2008-09-09 19:04:59 +00:00
|
|
|
|
2014-06-03 02:41:57 +00:00
|
|
|
@foo1 = alias void ()* @foo2
|
2014-03-27 15:26:56 +00:00
|
|
|
; CHECK: @foo1 = alias void ()* @bar2
|
2013-06-12 16:35:53 +00:00
|
|
|
|
2014-06-03 02:41:57 +00:00
|
|
|
@foo2 = alias void()* @bar1
|
2014-03-27 15:26:56 +00:00
|
|
|
; CHECK: @foo2 = alias void ()* @bar2
|
2013-06-12 16:35:53 +00:00
|
|
|
|
2008-09-09 19:04:59 +00:00
|
|
|
@bar1 = alias void ()* @bar2
|
2013-06-12 16:35:53 +00:00
|
|
|
; CHECK: @bar1 = alias void ()* @bar2
|
2008-09-09 19:04:59 +00:00
|
|
|
|
2014-07-30 22:51:54 +00:00
|
|
|
@weak1 = weak alias void ()* @bar2
|
|
|
|
; CHECK: @weak1 = weak alias void ()* @bar2
|
2014-03-27 15:26:56 +00:00
|
|
|
|
2014-07-01 00:30:56 +00:00
|
|
|
@bar4 = private unnamed_addr constant [2 x i8*] zeroinitializer
|
2015-03-13 18:20:45 +00:00
|
|
|
@foo4 = linkonce_odr unnamed_addr alias getelementptr inbounds ([2 x i8*], [2 x i8*]* @bar4, i32 0, i32 1)
|
|
|
|
; CHECK: @foo4 = linkonce_odr unnamed_addr alias getelementptr inbounds ([2 x i8*], [2 x i8*]* @bar4, i32 0, i32 1)
|
2014-07-01 00:30:56 +00:00
|
|
|
|
2014-03-12 20:15:49 +00:00
|
|
|
define void @bar2() {
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
; CHECK: define void @bar2()
|
2008-09-09 19:04:59 +00:00
|
|
|
|
|
|
|
define void @baz() {
|
|
|
|
entry:
|
2013-06-12 16:35:53 +00:00
|
|
|
call void @foo1()
|
2014-03-27 15:26:56 +00:00
|
|
|
; CHECK: call void @bar2()
|
2013-06-12 16:35:53 +00:00
|
|
|
|
|
|
|
call void @foo2()
|
2014-03-27 15:26:56 +00:00
|
|
|
; CHECK: call void @bar2()
|
2013-06-12 16:35:53 +00:00
|
|
|
|
|
|
|
call void @bar1()
|
|
|
|
; CHECK: call void @bar2()
|
|
|
|
|
2014-03-27 15:26:56 +00:00
|
|
|
call void @weak1()
|
|
|
|
; CHECK: call void @weak1()
|
2013-06-12 16:35:53 +00:00
|
|
|
ret void
|
2008-09-09 19:04:59 +00:00
|
|
|
}
|
2013-06-12 16:45:47 +00:00
|
|
|
|
|
|
|
@foo3 = alias void ()* @bar3
|
|
|
|
; CHECK-NOT: bar3
|
|
|
|
|
|
|
|
define internal void @bar3() {
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
;CHECK: define void @foo3
|