diff options
Diffstat (limited to 'llvm/test/Linker')
| -rw-r--r-- | llvm/test/Linker/Inputs/alias-2.ll | 7 | ||||
| -rw-r--r-- | llvm/test/Linker/alias-2.ll | 24 |
2 files changed, 31 insertions, 0 deletions
diff --git a/llvm/test/Linker/Inputs/alias-2.ll b/llvm/test/Linker/Inputs/alias-2.ll new file mode 100644 index 00000000000..03c1d91fe6b --- /dev/null +++ b/llvm/test/Linker/Inputs/alias-2.ll @@ -0,0 +1,7 @@ +define void @B() { + call void @A() + ret void +} + +declare void @A() + diff --git a/llvm/test/Linker/alias-2.ll b/llvm/test/Linker/alias-2.ll new file mode 100644 index 00000000000..8875aa76455 --- /dev/null +++ b/llvm/test/Linker/alias-2.ll @@ -0,0 +1,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 (), void ()* @A + +define void @D() { + call void @C() + ret void +} + +define void @A() { + ret void +} + +; CHECK-DAG: @C = alias void (), void ()* @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() |

