• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; We use a temporary file so that the test fails when opt crashes.
2
3; RUN: opt < %s -globalopt -S > %t
4; RUN: FileCheck %s < %t
5
6@foo1 = alias void ()* @foo2
7; CHECK: @foo1 = alias void ()* @foo2
8
9@foo2 = alias weak void()* @bar1
10; CHECK: @foo2 = alias weak void ()* @bar2
11
12@bar1  = alias void ()* @bar2
13; CHECK: @bar1 = alias void ()* @bar2
14
15declare void @bar2()
16; CHECK: declare void @bar2()
17
18define void @baz() {
19entry:
20         call void @foo1()
21; CHECK: call void @foo2()
22
23         call void @foo2()
24; CHECK: call void @foo2()
25
26         call void @bar1()
27; CHECK: call void @bar2()
28
29         ret void
30}
31
32@foo3 = alias void ()* @bar3
33; CHECK-NOT: bar3
34
35define internal void @bar3() {
36  ret void
37}
38;CHECK: define void @foo3
39