diff --git a/test/Linker/Inputs/ident.a.ll b/test/Linker/Inputs/ident.a.ll new file mode 100644 index 00000000000..ebda9402f4b --- /dev/null +++ b/test/Linker/Inputs/ident.a.ll @@ -0,0 +1,3 @@ +!llvm.ident = !{!0, !1} +!0 = metadata !{metadata !"Compiler V1"} +!1 = metadata !{metadata !"Compiler V2"} diff --git a/test/Linker/Inputs/ident.b.ll b/test/Linker/Inputs/ident.b.ll new file mode 100644 index 00000000000..21ee1d81438 --- /dev/null +++ b/test/Linker/Inputs/ident.b.ll @@ -0,0 +1,2 @@ +!llvm.ident = !{!0} +!0 = metadata !{metadata !"Compiler V3"} diff --git a/test/Linker/ident.ll b/test/Linker/ident.ll new file mode 100644 index 00000000000..93bf8c7b2ca --- /dev/null +++ b/test/Linker/ident.ll @@ -0,0 +1,9 @@ +; RUN: llvm-link %S/Inputs/ident.a.ll %S/Inputs/ident.b.ll -S | FileCheck %s + +; Verify that multiple input llvm.ident metadata are linked together. + +; CHECK-DAG: !llvm.ident = !{!0, !1, !2} +; CHECK-DAG: "Compiler V1" +; CHECK-DAG: "Compiler V2" +; CHECK-DAG: "Compiler V3" +