aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/Linker/alias-2.ll
blob: 4ee5ead0f2928c277211c9781c5809ad6894bec1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
; RUN: llvm-link %s %S/Inputs/alias-2.ll -S -o - | FileCheck %s
; RUN: llvm-link %S/Inputs/alias-2.ll %s -S -o - | FileCheck %s

; Test the fix for PR26152, where A from the second module is
; erroneously renamed to A.1 and not linked to the declaration from
; the first module

@C = alias void (), ptr @A

define void @D() {
  call void @C()
  ret void
}

define void @A() {
  ret void
}

; CHECK-DAG: @C = alias void (), ptr @A
; CHECK-DAG: define void @B()
; CHECK-DAG:   call void @A()
; CHECK-DAG: define void @D()
; CHECK-DAG:   call void @C()
; CHECK-DAG: define void @A()