aboutsummaryrefslogtreecommitdiff
path: root/test/Linker
diff options
context:
space:
mode:
Diffstat (limited to 'test/Linker')
-rw-r--r--test/Linker/DbgDeclare.ll2
-rw-r--r--test/Linker/DbgDeclare2.ll2
-rw-r--r--test/Linker/Inputs/metadata-source-a.ll22
-rw-r--r--test/Linker/Inputs/metadata-source-b.ll22
-rw-r--r--test/Linker/Inputs/odr-lambda-2.ll6
-rw-r--r--test/Linker/Inputs/only-needed-debug-metadata.ll2
-rw-r--r--test/Linker/Inputs/pr26037.ll2
-rw-r--r--test/Linker/Inputs/replaced-function-matches-first-subprogram.ll2
-rw-r--r--test/Linker/Inputs/thinlto_funcimport_debug.ll2
-rw-r--r--test/Linker/Inputs/type-unique-inheritance-a.ll2
-rw-r--r--test/Linker/Inputs/type-unique-inheritance-b.ll4
-rw-r--r--test/Linker/Inputs/type-unique-simple2-a.ll2
-rw-r--r--test/Linker/Inputs/type-unique-simple2-b.ll4
-rw-r--r--test/Linker/apple-version.ll8
-rw-r--r--test/Linker/datalayout.ll4
-rw-r--r--test/Linker/drop-debug.ll2
-rw-r--r--test/Linker/metadata-source.ll4
-rw-r--r--test/Linker/odr-lambda-1.ll6
-rw-r--r--test/Linker/only-needed-debug-metadata.ll4
-rw-r--r--test/Linker/pr26037.ll8
-rw-r--r--test/Linker/redefinition.ll2
-rw-r--r--test/Linker/replaced-function-matches-first-subprogram.ll6
-rw-r--r--test/Linker/subprogram-linkonce-weak.ll12
-rw-r--r--test/Linker/targettriple.ll6
-rw-r--r--test/Linker/thinlto_funcimport_debug.ll8
-rw-r--r--test/Linker/type-unique-dst-types.ll6
-rw-r--r--test/Linker/type-unique-odr-a.ll4
-rw-r--r--test/Linker/type-unique-odr-b.ll6
-rw-r--r--test/Linker/type-unique-simple-a.ll2
-rw-r--r--test/Linker/type-unique-simple-b.ll4
-rw-r--r--test/Linker/type-unique-simple2-a.ll10
-rw-r--r--test/Linker/type-unique-simple2-b.ll4
-rw-r--r--test/Linker/type-unique-type-array-a.ll8
-rw-r--r--test/Linker/type-unique-type-array-b.ll8
34 files changed, 126 insertions, 70 deletions
diff --git a/test/Linker/DbgDeclare.ll b/test/Linker/DbgDeclare.ll
index 99ac5bdac900..3e2e3b3dfb9f 100644
--- a/test/Linker/DbgDeclare.ll
+++ b/test/Linker/DbgDeclare.ll
@@ -39,7 +39,7 @@ declare void @test(i32, i8**)
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 173515)", isOptimized: true, emissionKind: FullDebug, file: !20, enums: !2, retainedTypes: !2, globals: !2)
!2 = !{}
-!5 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !20, scope: null, type: !7, variables: !2)
+!5 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !20, scope: null, type: !7, retainedNodes: !2)
!6 = !DIFile(filename: "main.cpp", directory: "/private/tmp")
!7 = !DISubroutineType(types: !8)
!8 = !{!9, !9, !10}
diff --git a/test/Linker/DbgDeclare2.ll b/test/Linker/DbgDeclare2.ll
index 2fc6d2cdef7e..106259b2789a 100644
--- a/test/Linker/DbgDeclare2.ll
+++ b/test/Linker/DbgDeclare2.ll
@@ -52,7 +52,7 @@ declare i32 @puts(i8*)
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 173515)", isOptimized: true, emissionKind: FullDebug, file: !25, enums: !2, retainedTypes: !2, globals: !2)
!2 = !{}
-!5 = distinct !DISubprogram(name: "print_args", linkageName: "test", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !26, scope: null, type: !7, variables: !2)
+!5 = distinct !DISubprogram(name: "print_args", linkageName: "test", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !26, scope: null, type: !7, retainedNodes: !2)
!6 = !DIFile(filename: "test.cpp", directory: "/private/tmp")
!7 = !DISubroutineType(types: !8)
!8 = !{null, !9, !10}
diff --git a/test/Linker/Inputs/metadata-source-a.ll b/test/Linker/Inputs/metadata-source-a.ll
new file mode 100644
index 000000000000..e828770e048a
--- /dev/null
+++ b/test/Linker/Inputs/metadata-source-a.ll
@@ -0,0 +1,22 @@
+; ModuleID = 'a.c'
+source_filename = "a.c"
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+@a = common global i32 0, align 4, !dbg !0
+
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!7, !8, !9}
+!llvm.ident = !{!10}
+
+!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
+!1 = distinct !DIGlobalVariable(name: "a", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 7.0.0 (https://git.llvm.org/git/clang.git/ c12b573f9ac61655cce52628b34235f58edaf984) (https://scott.linder@llvm.org/git/llvm.git 90c4822e8541eb07891cd03e614c530c30f8aa12)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
+!3 = !DIFile(filename: "a.c", directory: "/home/slinder1/test/link", source: "int a;\0A")
+!4 = !{}
+!5 = !{!0}
+!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+!7 = !{i32 2, !"Dwarf Version", i32 4}
+!8 = !{i32 2, !"Debug Info Version", i32 3}
+!9 = !{i32 1, !"wchar_size", i32 4}
+!10 = !{!"clang version 7.0.0 (https://git.llvm.org/git/clang.git/ c12b573f9ac61655cce52628b34235f58edaf984) (https://scott.linder@llvm.org/git/llvm.git 90c4822e8541eb07891cd03e614c530c30f8aa12)"}
diff --git a/test/Linker/Inputs/metadata-source-b.ll b/test/Linker/Inputs/metadata-source-b.ll
new file mode 100644
index 000000000000..2bda92e71b26
--- /dev/null
+++ b/test/Linker/Inputs/metadata-source-b.ll
@@ -0,0 +1,22 @@
+; ModuleID = 'b.c'
+source_filename = "b.c"
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+@b = common global i32 0, align 4, !dbg !0
+
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!7, !8, !9}
+!llvm.ident = !{!10}
+
+!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
+!1 = distinct !DIGlobalVariable(name: "b", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 7.0.0 (https://git.llvm.org/git/clang.git/ c12b573f9ac61655cce52628b34235f58edaf984) (https://scott.linder@llvm.org/git/llvm.git 90c4822e8541eb07891cd03e614c530c30f8aa12)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
+!3 = !DIFile(filename: "b.c", directory: "/home/slinder1/test/link", source: "int b;\0A")
+!4 = !{}
+!5 = !{!0}
+!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+!7 = !{i32 2, !"Dwarf Version", i32 4}
+!8 = !{i32 2, !"Debug Info Version", i32 3}
+!9 = !{i32 1, !"wchar_size", i32 4}
+!10 = !{!"clang version 7.0.0 (https://git.llvm.org/git/clang.git/ c12b573f9ac61655cce52628b34235f58edaf984) (https://scott.linder@llvm.org/git/llvm.git 90c4822e8541eb07891cd03e614c530c30f8aa12)"}
diff --git a/test/Linker/Inputs/odr-lambda-2.ll b/test/Linker/Inputs/odr-lambda-2.ll
index 8c52dbd0d41a..2784da6a99a2 100644
--- a/test/Linker/Inputs/odr-lambda-2.ll
+++ b/test/Linker/Inputs/odr-lambda-2.ll
@@ -70,7 +70,7 @@ attributes #2 = { noinline nounwind optnone ssp uwtable }
!5 = !{i32 1, !"wchar_size", i32 4}
!6 = !{i32 7, !"PIC Level", i32 2}
!7 = !{!"clang version 6.0.0 (trunk 315772) (llvm/trunk 315773)"}
-!8 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 7, type: !9, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
+!8 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 7, type: !9, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
!9 = !DISubroutineType(types: !10)
!10 = !{!11, !11, !12}
!11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
@@ -83,7 +83,7 @@ attributes #2 = { noinline nounwind optnone ssp uwtable }
!18 = !DILocation(line: 7, column: 27, scope: !8)
!19 = !DILocation(line: 8, column: 3, scope: !8)
!20 = !DILocation(line: 9, column: 1, scope: !8)
-!21 = distinct !DISubprogram(name: "consumeError", linkageName: "_Z12consumeError5Error", scope: !1, file: !1, line: 4, type: !22, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
+!21 = distinct !DISubprogram(name: "consumeError", linkageName: "_Z12consumeError5Error", scope: !1, file: !1, line: 4, type: !22, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
!22 = !DISubroutineType(types: !23)
!23 = !{null, !24}
!24 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "Error", file: !1, line: 1, size: 8, elements: !2, identifier: "_ZTS5Error")
@@ -91,7 +91,7 @@ attributes #2 = { noinline nounwind optnone ssp uwtable }
!26 = !DILocation(line: 4, column: 32, scope: !21)
!27 = !DILocation(line: 5, column: 3, scope: !21)
!28 = !DILocation(line: 6, column: 1, scope: !21)
-!29 = distinct !DISubprogram(name: "handleAllErrors<(lambda at /tmp/odr-lambda-2.ii:5:20)>", linkageName: "_Z15handleAllErrorsIZ12consumeError5ErrorEUlvE_EvT_", scope: !1, file: !1, line: 3, type: !30, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, templateParams: !33, variables: !2)
+!29 = distinct !DISubprogram(name: "handleAllErrors<(lambda at /tmp/odr-lambda-2.ii:5:20)>", linkageName: "_Z15handleAllErrorsIZ12consumeError5ErrorEUlvE_EvT_", scope: !1, file: !1, line: 3, type: !30, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, templateParams: !33, retainedNodes: !2)
!30 = !DISubroutineType(types: !31)
!31 = !{null, !32}
!32 = distinct !DICompositeType(tag: DW_TAG_class_type, scope: !21, file: !1, line: 5, size: 8, elements: !2, identifier: "_ZTSZ12consumeError5ErrorEUlvE_")
diff --git a/test/Linker/Inputs/only-needed-debug-metadata.ll b/test/Linker/Inputs/only-needed-debug-metadata.ll
index a944c8ab9321..63a02456e058 100644
--- a/test/Linker/Inputs/only-needed-debug-metadata.ll
+++ b/test/Linker/Inputs/only-needed-debug-metadata.ll
@@ -15,7 +15,7 @@ define void @bar() !dbg !4 {
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251407) (llvm/trunk 251401)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
!1 = !DIFile(filename: "linkused.b.c", directory: ".")
!2 = !{}
-!4 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 5, type: !5, isLocal: false, isDefinition: true, scopeLine: 5, isOptimized: true, unit: !0, variables: !2)
+!4 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 5, type: !5, isLocal: false, isDefinition: true, scopeLine: 5, isOptimized: true, unit: !0, retainedNodes: !2)
!5 = !DISubroutineType(types: !6)
!6 = !{null}
!7 = !{i32 2, !"Dwarf Version", i32 4}
diff --git a/test/Linker/Inputs/pr26037.ll b/test/Linker/Inputs/pr26037.ll
index a1a024f19060..9d7190ef1e72 100644
--- a/test/Linker/Inputs/pr26037.ll
+++ b/test/Linker/Inputs/pr26037.ll
@@ -12,7 +12,7 @@ entry:
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 256934) (llvm/trunk 256936)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
!1 = !DIFile(filename: "main.cc", directory: "")
!2 = !{}
-!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
+!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
!5 = !DISubroutineType(types: !6)
!6 = !{!7}
!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
diff --git a/test/Linker/Inputs/replaced-function-matches-first-subprogram.ll b/test/Linker/Inputs/replaced-function-matches-first-subprogram.ll
index 7598ab159eb4..d42eb9ffa86a 100644
--- a/test/Linker/Inputs/replaced-function-matches-first-subprogram.ll
+++ b/test/Linker/Inputs/replaced-function-matches-first-subprogram.ll
@@ -15,7 +15,7 @@ entry:
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 224193) (llvm/trunk 224197)", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
!1 = !DIFile(filename: "t2.cpp", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d2")
!2 = !{}
-!4 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !5, scope: !6, type: !7, variables: !2)
+!4 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !5, scope: !6, type: !7, retainedNodes: !2)
!5 = !DIFile(filename: "../t.h", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d2")
!6 = !DIFile(filename: "../t.h", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d2")
!7 = !DISubroutineType(types: !2)
diff --git a/test/Linker/Inputs/thinlto_funcimport_debug.ll b/test/Linker/Inputs/thinlto_funcimport_debug.ll
index cc76d8ae29ed..a5fab0cdd335 100644
--- a/test/Linker/Inputs/thinlto_funcimport_debug.ll
+++ b/test/Linker/Inputs/thinlto_funcimport_debug.ll
@@ -25,7 +25,7 @@ attributes #2 = { nounwind }
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251407) (llvm/trunk 251401)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
!1 = !DIFile(filename: "dbg_main.c", directory: ".")
!2 = !{}
-!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, isOptimized: true, unit: !0, variables: !2)
+!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, isOptimized: true, unit: !0, retainedNodes: !2)
!5 = !DISubroutineType(types: !6)
!6 = !{!7}
!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
diff --git a/test/Linker/Inputs/type-unique-inheritance-a.ll b/test/Linker/Inputs/type-unique-inheritance-a.ll
index 15bd0383a4d8..094ea6454c13 100644
--- a/test/Linker/Inputs/type-unique-inheritance-a.ll
+++ b/test/Linker/Inputs/type-unique-inheritance-a.ll
@@ -80,7 +80,7 @@ attributes #1 = { nounwind readnone }
!11 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 4, size: 32, align: 32, flags: DIFlagPrivate, file: !9, scope: !8, baseType: !12)
!12 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!13 = !DIDerivedType(tag: DW_TAG_member, name: "x", line: 4, size: 32, align: 32, offset: 32, flags: DIFlagPrivate, file: !5, scope: !4, baseType: !12)
-!15 = distinct !DISubprogram(name: "f", linkageName: "_Z1fi", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !16, type: !17, variables: !2)
+!15 = distinct !DISubprogram(name: "f", linkageName: "_Z1fi", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !16, type: !17, retainedNodes: !2)
!16 = !DIFile(filename: "foo.cpp", directory: "/Users/mren/c_testing/type_unique_air/inher")
!17 = !DISubroutineType(types: !18)
!18 = !{null, !12}
diff --git a/test/Linker/Inputs/type-unique-inheritance-b.ll b/test/Linker/Inputs/type-unique-inheritance-b.ll
index fafc25a7c77e..15f6cb29a3dd 100644
--- a/test/Linker/Inputs/type-unique-inheritance-b.ll
+++ b/test/Linker/Inputs/type-unique-inheritance-b.ll
@@ -59,11 +59,11 @@ attributes #3 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "n
!16 = !{!17}
!17 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 4, size: 32, align: 32, flags: DIFlagPrivate, file: !5, scope: !15, baseType: !8)
!18 = !DIDerivedType(tag: DW_TAG_member, name: "x", line: 4, size: 32, align: 32, offset: 32, flags: DIFlagPrivate, file: !12, scope: !11, baseType: !8)
-!20 = distinct !DISubprogram(name: "g", linkageName: "_Z1gi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: !21, type: !22, variables: !2)
+!20 = distinct !DISubprogram(name: "g", linkageName: "_Z1gi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: !21, type: !22, retainedNodes: !2)
!21 = !DIFile(filename: "bar.cpp", directory: "/Users/mren/c_testing/type_unique_air/inher")
!22 = !DISubroutineType(types: !23)
!23 = !{null, !8}
-!24 = distinct !DISubprogram(name: "main", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 9, file: !1, scope: !21, type: !25, variables: !2)
+!24 = distinct !DISubprogram(name: "main", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 9, file: !1, scope: !21, type: !25, retainedNodes: !2)
!25 = !DISubroutineType(types: !26)
!26 = !{!8}
!27 = !{i32 2, !"Dwarf Version", i32 2}
diff --git a/test/Linker/Inputs/type-unique-simple2-a.ll b/test/Linker/Inputs/type-unique-simple2-a.ll
index 534442a51b78..ae0f931bebd3 100644
--- a/test/Linker/Inputs/type-unique-simple2-a.ll
+++ b/test/Linker/Inputs/type-unique-simple2-a.ll
@@ -74,7 +74,7 @@ attributes #1 = { nounwind readnone }
!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!9 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 3, size: 64, align: 64, offset: 64, file: !5, scope: !4, baseType: !10)
!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4)
-!12 = distinct !DISubprogram(name: "f", linkageName: "_Z1fi", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !13, type: !14, variables: !2)
+!12 = distinct !DISubprogram(name: "f", linkageName: "_Z1fi", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !13, type: !14, retainedNodes: !2)
!13 = !DIFile(filename: "foo.cpp", directory: ".")
!14 = !DISubroutineType(types: !15)
!15 = !{null, !8}
diff --git a/test/Linker/Inputs/type-unique-simple2-b.ll b/test/Linker/Inputs/type-unique-simple2-b.ll
index f9499d8d7e24..04e139d107e8 100644
--- a/test/Linker/Inputs/type-unique-simple2-b.ll
+++ b/test/Linker/Inputs/type-unique-simple2-b.ll
@@ -47,11 +47,11 @@ attributes #3 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "n
!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!9 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 3, size: 64, align: 64, offset: 64, file: !5, scope: !4, baseType: !10)
!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4)
-!12 = distinct !DISubprogram(name: "g", linkageName: "_Z1gi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: !13, type: !14, variables: !2)
+!12 = distinct !DISubprogram(name: "g", linkageName: "_Z1gi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: !13, type: !14, retainedNodes: !2)
!13 = !DIFile(filename: "bar.cpp", directory: ".")
!14 = !DISubroutineType(types: !15)
!15 = !{null, !8}
-!16 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !13, type: !17, variables: !2)
+!16 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !13, type: !17, retainedNodes: !2)
!17 = !DISubroutineType(types: !18)
!18 = !{!8}
!19 = !{i32 2, !"Dwarf Version", i32 2}
diff --git a/test/Linker/apple-version.ll b/test/Linker/apple-version.ll
index 4dbc866ac3d7..06ec2933e049 100644
--- a/test/Linker/apple-version.ll
+++ b/test/Linker/apple-version.ll
@@ -11,14 +11,14 @@
; warnings are issued when the Triples differ only in version numbers.
; CHECK1: target triple = "x86_64-apple-macosx10.10.0"
-; WARN1-NOT: WARNING
+; WARN1-NOT: warning
; CHECK2: target triple = "x86_64-apple-macosx10.9.0"
-; WARN2-NOT: WARNING
+; WARN2-NOT: warning
; i386 and x86_64 map to different ArchType enums.
-; WARN3: WARNING: Linking two modules of different target triples
+; WARN3: warning: Linking two modules of different target triples
; x86_64h and x86_64 map to the same ArchType enum.
-; WARN4-NOT: WARNING
+; WARN4-NOT: warning
target triple = "x86_64-apple-macosx10.9.0"
diff --git a/test/Linker/datalayout.ll b/test/Linker/datalayout.ll
index cba28776eb57..55e804e8560a 100644
--- a/test/Linker/datalayout.ll
+++ b/test/Linker/datalayout.ll
@@ -8,6 +8,6 @@
target datalayout = "e"
-; WARN-A-NOT: WARNING
+; WARN-A-NOT: warning
-; WARN-B: WARNING: Linking two modules of different data layouts:
+; WARN-B: warning: Linking two modules of different data layouts:
diff --git a/test/Linker/drop-debug.ll b/test/Linker/drop-debug.ll
index 06689872e12c..9c1072a75de2 100644
--- a/test/Linker/drop-debug.ll
+++ b/test/Linker/drop-debug.ll
@@ -3,4 +3,4 @@
;; drop-debug.bc was created from "void f(void) {}" with clang 3.5 and
; -gline-tables-only, so it contains old debug info.
-; CHECK: WARNING: ignoring debug info with an invalid version (1) in {{.*}}/Inputs/drop-debug.bc
+; CHECK: warning: ignoring debug info with an invalid version (1) in {{.*}}/Inputs/drop-debug.bc
diff --git a/test/Linker/metadata-source.ll b/test/Linker/metadata-source.ll
new file mode 100644
index 000000000000..6e667434826b
--- /dev/null
+++ b/test/Linker/metadata-source.ll
@@ -0,0 +1,4 @@
+; RUN: llvm-link %p/Inputs/metadata-source-a.ll %p/Inputs/metadata-source-b.ll -S | FileCheck %s
+
+; CHECK: !DIFile(filename: "a.c", directory: "/home/slinder1/test/link", source: "int a;\0A")
+; CHECK: !DIFile(filename: "b.c", directory: "/home/slinder1/test/link", source: "int b;\0A")
diff --git a/test/Linker/odr-lambda-1.ll b/test/Linker/odr-lambda-1.ll
index f0eb65427048..90611b8dc26a 100644
--- a/test/Linker/odr-lambda-1.ll
+++ b/test/Linker/odr-lambda-1.ll
@@ -74,12 +74,12 @@ attributes #1 = { nounwind readnone speculatable }
!5 = !{i32 1, !"wchar_size", i32 4}
!6 = !{i32 7, !"PIC Level", i32 2}
!7 = !{!"clang version 6.0.0 (trunk 315772) (llvm/trunk 315773)"}
-!8 = distinct !DISubprogram(name: "ArchiveMemberHeader", linkageName: "_Z19ArchiveMemberHeaderv", scope: !1, file: !1, line: 7, type: !9, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
+!8 = distinct !DISubprogram(name: "ArchiveMemberHeader", linkageName: "_Z19ArchiveMemberHeaderv", scope: !1, file: !1, line: 7, type: !9, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
!9 = !DISubroutineType(types: !10)
!10 = !{null}
!11 = !DILocation(line: 9, column: 3, scope: !8)
!12 = !DILocation(line: 10, column: 1, scope: !8)
-!13 = distinct !DISubprogram(name: "consumeError", linkageName: "_Z12consumeError5Error", scope: !1, file: !1, line: 4, type: !14, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
+!13 = distinct !DISubprogram(name: "consumeError", linkageName: "_Z12consumeError5Error", scope: !1, file: !1, line: 4, type: !14, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
!14 = !DISubroutineType(types: !15)
!15 = !{null, !16}
!16 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "Error", file: !1, line: 1, size: 8, elements: !2, identifier: "_ZTS5Error")
@@ -87,7 +87,7 @@ attributes #1 = { nounwind readnone speculatable }
!18 = !DILocation(line: 4, column: 32, scope: !13)
!19 = !DILocation(line: 5, column: 3, scope: !13)
!20 = !DILocation(line: 6, column: 1, scope: !13)
-!21 = distinct !DISubprogram(name: "handleAllErrors<(lambda at /tmp/odr-lambda-1.ii:5:20)>", linkageName: "_Z15handleAllErrorsIZ12consumeError5ErrorEUlvE_EvT_", scope: !1, file: !1, line: 3, type: !22, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, templateParams: !25, variables: !2)
+!21 = distinct !DISubprogram(name: "handleAllErrors<(lambda at /tmp/odr-lambda-1.ii:5:20)>", linkageName: "_Z15handleAllErrorsIZ12consumeError5ErrorEUlvE_EvT_", scope: !1, file: !1, line: 3, type: !22, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, templateParams: !25, retainedNodes: !2)
!22 = !DISubroutineType(types: !23)
!23 = !{null, !24}
!24 = distinct !DICompositeType(tag: DW_TAG_class_type, scope: !13, file: !1, line: 5, size: 8, elements: !2, identifier: "_ZTSZ12consumeError5ErrorEUlvE_")
diff --git a/test/Linker/only-needed-debug-metadata.ll b/test/Linker/only-needed-debug-metadata.ll
index 00f90b1ecdf0..11e1fd1adee9 100644
--- a/test/Linker/only-needed-debug-metadata.ll
+++ b/test/Linker/only-needed-debug-metadata.ll
@@ -41,13 +41,13 @@ define i32 @unused() !dbg !18 {
!9 = !{i32 2, !"Dwarf Version", i32 4}
!10 = !{i32 2, !"Debug Info Version", i32 3}
!11 = !{!"clang version 3.8.0 (trunk 251407) (llvm/trunk 251401)"}
-!12 = distinct !DISubprogram(name: "foo", scope: !3, file: !3, line: 4, type: !13, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: true, unit: !2, variables: !15)
+!12 = distinct !DISubprogram(name: "foo", scope: !3, file: !3, line: 4, type: !13, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: true, unit: !2, retainedNodes: !15)
!13 = !DISubroutineType(types: !14)
!14 = !{!8, !8}
!15 = !{!16}
!16 = !DILocalVariable(name: "x", arg: 1, scope: !12, file: !3, line: 4, type: !8)
!17 = !DILocation(line: 4, column: 13, scope: !12)
-!18 = distinct !DISubprogram(name: "unused", scope: !3, file: !3, line: 8, type: !19, isLocal: false, isDefinition: true, scopeLine: 8, isOptimized: true, unit: !2, variables: !4)
+!18 = distinct !DISubprogram(name: "unused", scope: !3, file: !3, line: 8, type: !19, isLocal: false, isDefinition: true, scopeLine: 8, isOptimized: true, unit: !2, retainedNodes: !4)
!19 = !DISubroutineType(types: !20)
!20 = !{!8}
!21 = !DILocation(line: 9, column: 3, scope: !18)
diff --git a/test/Linker/pr26037.ll b/test/Linker/pr26037.ll
index da771669574f..bcce0598ebda 100644
--- a/test/Linker/pr26037.ll
+++ b/test/Linker/pr26037.ll
@@ -38,11 +38,11 @@ entry:
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 256934) (llvm/trunk 256936)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, imports: !9)
!1 = !DIFile(filename: "a2.cc", directory: "")
!2 = !{}
-!4 = distinct !DISubprogram(name: "a", linkageName: "_ZN1A1aEv", scope: !5, file: !1, line: 7, type: !6, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
+!4 = distinct !DISubprogram(name: "a", linkageName: "_ZN1A1aEv", scope: !5, file: !1, line: 7, type: !6, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
!5 = !DINamespace(name: "A", scope: null)
!6 = !DISubroutineType(types: !7)
!7 = !{null}
-!8 = distinct !DISubprogram(name: "b", linkageName: "_ZN1A1bEv", scope: !5, file: !1, line: 8, type: !6, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
+!8 = distinct !DISubprogram(name: "b", linkageName: "_ZN1A1bEv", scope: !5, file: !1, line: 8, type: !6, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
!9 = !{!10, !16}
!10 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !8, entity: !4, file: !1, line: 8)
!11 = !{i32 2, !"Dwarf Version", i32 4}
@@ -52,8 +52,8 @@ entry:
!15 = !DILocation(line: 8, column: 24, scope: !8)
!16 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !17, entity: !19, file: !1, line: 8)
!17 = distinct !DILexicalBlock(scope: !18, file: !1, line: 9, column: 8)
-!18 = distinct !DISubprogram(name: "c", linkageName: "_ZN1A1cEv", scope: !5, file: !1, line: 9, type: !6, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
+!18 = distinct !DISubprogram(name: "c", linkageName: "_ZN1A1cEv", scope: !5, file: !1, line: 9, type: !6, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
!19 = distinct !DILexicalBlock(scope: !20, file: !1, line: 10, column: 8)
-!20 = distinct !DISubprogram(name: "d", linkageName: "_ZN1A1dEv", scope: !5, file: !1, line: 10, type: !6, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
+!20 = distinct !DISubprogram(name: "d", linkageName: "_ZN1A1dEv", scope: !5, file: !1, line: 10, type: !6, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
!21 = !DILocation(line: 9, column: 8, scope: !18)
!22 = !DILocation(line: 10, column: 8, scope: !20)
diff --git a/test/Linker/redefinition.ll b/test/Linker/redefinition.ll
index 1177a7094e0c..37aed3a7dbb2 100644
--- a/test/Linker/redefinition.ll
+++ b/test/Linker/redefinition.ll
@@ -2,5 +2,5 @@
; in different modules.
; RUN: not llvm-link %s %s -o %t.bc 2>&1 | FileCheck %s
; RUN: not llvm-link %s %S/Inputs/redefinition.ll -o %t.bc 2>&1 | FileCheck %s
-; CHECK: ERROR: Linking globals named 'foo': symbol multiply defined!
+; CHECK: error: Linking globals named 'foo': symbol multiply defined!
define void @foo() { ret void }
diff --git a/test/Linker/replaced-function-matches-first-subprogram.ll b/test/Linker/replaced-function-matches-first-subprogram.ll
index 69500a13864c..fc2c361a246d 100644
--- a/test/Linker/replaced-function-matches-first-subprogram.ll
+++ b/test/Linker/replaced-function-matches-first-subprogram.ll
@@ -45,7 +45,7 @@ entry:
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 224193) (llvm/trunk 224197)", isOptimized: false, emissionKind: LineTablesOnly, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
!1 = !DIFile(filename: "t1.cpp", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d1")
!2 = !{}
-!4 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2)
+!4 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, retainedNodes: !2)
!5 = !DIFile(filename: "t1.cpp", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d1")
!6 = !DISubroutineType(types: !2)
@@ -54,8 +54,8 @@ entry:
; We can't use CHECK-NOT/CHECK-SAME with a CHECK-DAG, so rely on field order to
; prove that there's no function: here.
-; CHECK-DAG: ![[SP2r:.*]] = {{.*}}!DISubprogram({{.*}} isOptimized: false, unit: ![[CU1]], variables:
-!7 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !8, scope: !9, type: !6, variables: !2)
+; CHECK-DAG: ![[SP2r:.*]] = {{.*}}!DISubprogram({{.*}} isOptimized: false, unit: ![[CU1]], retainedNodes:
+!7 = distinct !DISubprogram(name: "foo", line: 2, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !8, scope: !9, type: !6, retainedNodes: !2)
; The new subprogram should be pointing at the new directory.
; CHECK-DAG: ![[FILE]] = !DIFile(filename: "../t.h", directory: "/Users/dexonsmith/data/llvm/staging/test/Linker/repro/d2")
diff --git a/test/Linker/subprogram-linkonce-weak.ll b/test/Linker/subprogram-linkonce-weak.ll
index 955955043ffb..25052b2f1687 100644
--- a/test/Linker/subprogram-linkonce-weak.ll
+++ b/test/Linker/subprogram-linkonce-weak.ll
@@ -147,14 +147,18 @@ entry:
; DW-LABEL: .debug_line contents:
; Check that we have the right things in the line table as well.
-; DWLW-LABEL: file_names[{{ *}}1]{{.*}} bar.c
+; DWLW-LABEL: file_names[ 1]:
+; DWLW-NEXT: name: "bar.c"
; DWLW: 2 0 1 0 0 is_stmt prologue_end
-; DWLW-LABEL: file_names[{{ *}}1]{{.*}} foo.c
+; DWLW-LABEL: file_names[ 1]:
+; DWLW-NEXT: name: "foo.c"
; DWLW: 52 0 1 0 0 is_stmt prologue_end
; DWLW-NOT: prologue_end
-; DWWL-LABEL: file_names[{{ *}}1]{{.*}} foo.c
+; DWWL-LABEL: file_names[ 1]:
+; DWWL-NEXT: name: "foo.c"
; DWWL: 52 0 1 0 0 is_stmt prologue_end
-; DWWL-LABEL: file_names[{{ *}}1]{{.*}} bar.c
+; DWWL-LABEL: file_names[ 1]:
+; DWWL-NEXT: name: "bar.c"
; DWWL: 2 0 1 0 0 is_stmt prologue_end
; DWWL-NOT: prologue_end
diff --git a/test/Linker/targettriple.ll b/test/Linker/targettriple.ll
index a159797856c8..214b5ec59f6a 100644
--- a/test/Linker/targettriple.ll
+++ b/test/Linker/targettriple.ll
@@ -13,10 +13,10 @@ target triple = "x86_64-unknown-linux-gnu"
; CHECK: target triple = "x86_64-unknown-linux-gnu"
-; WARN-A-NOT: WARNING
+; WARN-A-NOT: warning
; i386 and x86_64 map to different ArchType enums.
-; WARN-B: WARNING: Linking two modules of different target triples:
+; WARN-B: warning: Linking two modules of different target triples:
; x86_64h and x86_64 map to the same ArchType enum.
-; WARN-C-NOT: WARNING
+; WARN-C-NOT: warning
diff --git a/test/Linker/thinlto_funcimport_debug.ll b/test/Linker/thinlto_funcimport_debug.ll
index e5f06353232f..6328f702080c 100644
--- a/test/Linker/thinlto_funcimport_debug.ll
+++ b/test/Linker/thinlto_funcimport_debug.ll
@@ -55,14 +55,14 @@ attributes #1 = { nounwind readnone }
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 251407) (llvm/trunk 251401)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
!1 = !DIFile(filename: "dbg.c", directory: ".")
!2 = !{}
-!4 = distinct !DISubprogram(name: "func1", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !8)
+!4 = distinct !DISubprogram(name: "func1", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !8)
!5 = !DISubroutineType(types: !6)
!6 = !{!7, !7}
!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!8 = !{!9, !10}
!9 = !DILocalVariable(name: "n", arg: 1, scope: !4, file: !1, line: 1, type: !7)
!10 = !DILocalVariable(name: "x", scope: !4, file: !1, line: 2, type: !7)
-!11 = distinct !DISubprogram(name: "func2", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !12)
+!11 = distinct !DISubprogram(name: "func2", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !12)
!12 = !{!13}
!13 = !DILocalVariable(name: "n", arg: 1, scope: !11, file: !1, line: 8, type: !7)
!14 = !{i32 2, !"Dwarf Version", i32 4}
@@ -78,10 +78,10 @@ attributes #1 = { nounwind readnone }
!24 = !DILocation(line: 8, column: 15, scope: !11)
!25 = !DILocation(line: 9, column: 3, scope: !11)
!26 = !DILocation(line: 9, column: 3, scope: !4)
-!27 = distinct !DISubprogram(name: "func3", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !28)
+!27 = distinct !DISubprogram(name: "func3", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !28)
!28 = !{!29}
!29 = !DILocalVariable(name: "n", arg: 1, scope: !30, file: !1, line: 8, type: !7)
-!30 = distinct !DISubprogram(name: "func4", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !31)
+!30 = distinct !DISubprogram(name: "func4", scope: !1, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !31)
!31 = !{!32}
!32 = !DILocalVariable(name: "n", arg: 1, scope: !30, file: !1, line: 8, type: !7)
diff --git a/test/Linker/type-unique-dst-types.ll b/test/Linker/type-unique-dst-types.ll
index 1adad49de91d..cfcad130e6ae 100644
--- a/test/Linker/type-unique-dst-types.ll
+++ b/test/Linker/type-unique-dst-types.ll
@@ -1,6 +1,8 @@
; RUN: llvm-link %p/type-unique-dst-types.ll \
; RUN: %p/Inputs/type-unique-dst-types2.ll \
-; RUN: %p/Inputs/type-unique-dst-types3.ll -S -o - | FileCheck %s
+; RUN: %p/Inputs/type-unique-dst-types3.ll -S -o %t1.ll
+; RUN: cat %t1.ll | FileCheck %s
+; RUN: cat %t1.ll | FileCheck --check-prefix=RENAMED %s
; This tests the importance of keeping track of which types are part of the
; destination module.
@@ -14,6 +16,8 @@
; CHECK: @g1 = external global %A
; CHECK: @g2 = external global %A
+; RENAMED-NOT: A.11
+
%A = type { %B }
%B = type { i8 }
@g3 = external global %A
diff --git a/test/Linker/type-unique-odr-a.ll b/test/Linker/type-unique-odr-a.ll
index 5143f8417313..5df2e4de366a 100644
--- a/test/Linker/type-unique-odr-a.ll
+++ b/test/Linker/type-unique-odr-a.ll
@@ -96,11 +96,11 @@ attributes #1 = { nounwind readnone }
!10 = !DISubroutineType(types: !11)
!11 = !{null, !12}
!12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
-!15 = distinct !DISubprogram(name: "baz", linkageName: "_Z3bazv", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 11, file: !5, scope: !16, type: !17, variables: !2)
+!15 = distinct !DISubprogram(name: "baz", linkageName: "_Z3bazv", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 11, file: !5, scope: !16, type: !17, retainedNodes: !2)
!16 = !DIFile(filename: "type-unique-odr-a.cpp", directory: "")
!17 = !DISubroutineType(types: !18)
!18 = !{null}
-!19 = distinct !DISubprogram(name: "bar", linkageName: "_ZL3barv", line: 7, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !5, scope: !16, type: !17, variables: !2)
+!19 = distinct !DISubprogram(name: "bar", linkageName: "_ZL3barv", line: 7, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !5, scope: !16, type: !17, retainedNodes: !2)
!20 = !{i32 2, !"Dwarf Version", i32 4}
!21 = !{i32 1, !"Debug Info Version", i32 3}
!22 = !{!"clang version 3.5.0 "}
diff --git a/test/Linker/type-unique-odr-b.ll b/test/Linker/type-unique-odr-b.ll
index 7856ca50b3ef..7992d691a430 100644
--- a/test/Linker/type-unique-odr-b.ll
+++ b/test/Linker/type-unique-odr-b.ll
@@ -67,12 +67,12 @@ attributes #1 = { nounwind readnone }
!10 = !DISubroutineType(types: !11)
!11 = !{null, !12}
!12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
-!15 = distinct !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 8, file: !5, scope: !4, type: !10, declaration: !9, variables: !2)
-!16 = distinct !DISubprogram(name: "f", linkageName: "_Z1fv", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 11, file: !5, scope: !17, type: !18, variables: !2)
+!15 = distinct !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 8, file: !5, scope: !4, type: !10, declaration: !9, retainedNodes: !2)
+!16 = distinct !DISubprogram(name: "f", linkageName: "_Z1fv", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 11, file: !5, scope: !17, type: !18, retainedNodes: !2)
!17 = !DIFile(filename: "type-unique-odr-b.cpp", directory: "")
!18 = !DISubroutineType(types: !19)
!19 = !{null}
-!20 = distinct !DISubprogram(name: "bar", linkageName: "_ZL3barv", line: 10, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 10, file: !5, scope: !17, type: !18, variables: !2)
+!20 = distinct !DISubprogram(name: "bar", linkageName: "_ZL3barv", line: 10, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 10, file: !5, scope: !17, type: !18, retainedNodes: !2)
!21 = !{i32 2, !"Dwarf Version", i32 4}
!22 = !{i32 1, !"Debug Info Version", i32 3}
!23 = !{!"clang version 3.5.0 "}
diff --git a/test/Linker/type-unique-simple-a.ll b/test/Linker/type-unique-simple-a.ll
index 20b349757f0e..c53d4fe4cc80 100644
--- a/test/Linker/type-unique-simple-a.ll
+++ b/test/Linker/type-unique-simple-a.ll
@@ -77,7 +77,7 @@ attributes #1 = { nounwind readnone }
!6 = !{!7}
!7 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !5, scope: !4, baseType: !8)
!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!10 = distinct !DISubprogram(name: "f", linkageName: "_Z1fi", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !11, type: !12, variables: !2)
+!10 = distinct !DISubprogram(name: "f", linkageName: "_Z1fi", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !11, type: !12, retainedNodes: !2)
!11 = !DIFile(filename: "foo.cpp", directory: "/Users/mren/c_testing/type_unique_air/simple")
!12 = !DISubroutineType(types: !13)
!13 = !{null, !8}
diff --git a/test/Linker/type-unique-simple-b.ll b/test/Linker/type-unique-simple-b.ll
index 203e016e8be4..8f9f7e153ef5 100644
--- a/test/Linker/type-unique-simple-b.ll
+++ b/test/Linker/type-unique-simple-b.ll
@@ -47,11 +47,11 @@ attributes #3 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "n
!6 = !{!7}
!7 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !5, scope: !4, baseType: !8)
!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!10 = distinct !DISubprogram(name: "g", linkageName: "_Z1gi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: !11, type: !12, variables: !2)
+!10 = distinct !DISubprogram(name: "g", linkageName: "_Z1gi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !1, scope: !11, type: !12, retainedNodes: !2)
!11 = !DIFile(filename: "bar.cpp", directory: "/Users/mren/c_testing/type_unique_air/simple")
!12 = !DISubroutineType(types: !13)
!13 = !{null, !8}
-!14 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !11, type: !15, variables: !2)
+!14 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !11, type: !15, retainedNodes: !2)
!15 = !DISubroutineType(types: !16)
!16 = !{!8}
!17 = !{i32 2, !"Dwarf Version", i32 2}
diff --git a/test/Linker/type-unique-simple2-a.ll b/test/Linker/type-unique-simple2-a.ll
index 8a67adefee26..996554736560 100644
--- a/test/Linker/type-unique-simple2-a.ll
+++ b/test/Linker/type-unique-simple2-a.ll
@@ -35,14 +35,14 @@ define i32 @_Z3barv() #0 !dbg !27 {
entry:
%tmp = alloca %class.A, align 8
%0 = bitcast %class.A* %tmp to i8*, !dbg !38
- call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 8, i32 8, i1 false), !dbg !38
+ call void @llvm.memset.p0i8.i64(i8* align 8 %0, i8 0, i64 8, i1 false), !dbg !38
call void @_ZN1AC1Ev(%class.A* %tmp) #1, !dbg !38
%call = call i32 @_ZN1A6getFooEv(%class.A* %tmp), !dbg !38
ret i32 %call, !dbg !38
}
; Function Attrs: nounwind
-declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) #1
+declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i1) #1
; Function Attrs: inlinehint nounwind
define linkonce_odr void @_ZN1AC1Ev(%class.A* %this) unnamed_addr #2 align 2 !dbg !31 {
@@ -105,13 +105,13 @@ attributes #4 = { nounwind readnone }
!22 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !23)
!23 = !DIDerivedType(tag: DW_TAG_typedef, name: "foo_t", line: 1, file: !24, baseType: !13)
!24 = !DIFile(filename: "a.cpp", directory: "")
-!27 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !24, scope: !28, type: !29, variables: !2)
+!27 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !24, scope: !28, type: !29, retainedNodes: !2)
!28 = !DIFile(filename: "a.cpp", directory: "")
!29 = !DISubroutineType(types: !30)
!30 = !{!23}
-!31 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC1Ev", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !5, scope: !4, type: !15, declaration: !32, variables: !2)
+!31 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC1Ev", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !5, scope: !4, type: !15, declaration: !32, retainedNodes: !2)
!32 = !DISubprogram(name: "A", isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scope: !4, type: !15)
-!34 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2Ev", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !5, scope: !4, type: !15, declaration: !32, variables: !2)
+!34 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2Ev", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !5, scope: !4, type: !15, declaration: !32, retainedNodes: !2)
!35 = !{i32 2, !"Dwarf Version", i32 2}
!36 = !{i32 1, !"Debug Info Version", i32 3}
!37 = !{!"clang version 3.5 "}
diff --git a/test/Linker/type-unique-simple2-b.ll b/test/Linker/type-unique-simple2-b.ll
index 2fbc9eb627b4..0e4df5fdf4d6 100644
--- a/test/Linker/type-unique-simple2-b.ll
+++ b/test/Linker/type-unique-simple2-b.ll
@@ -70,9 +70,9 @@ attributes #1 = { nounwind readnone }
!21 = !{!22, !17}
!22 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !23)
!23 = !DIDerivedType(tag: DW_TAG_typedef, name: "foo_t", line: 1, file: !5, baseType: !13)
-!26 = distinct !DISubprogram(name: "setFoo", linkageName: "_ZN1A6setFooEv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !27, scope: !4, type: !15, declaration: !14, variables: !2)
+!26 = distinct !DISubprogram(name: "setFoo", linkageName: "_ZN1A6setFooEv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !27, scope: !4, type: !15, declaration: !14, retainedNodes: !2)
!27 = !DIFile(filename: "b.cpp", directory: "")
-!28 = distinct !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !27, scope: !4, type: !20, declaration: !19, variables: !2)
+!28 = distinct !DISubprogram(name: "getFoo", linkageName: "_ZN1A6getFooEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !27, scope: !4, type: !20, declaration: !19, retainedNodes: !2)
!29 = !{i32 2, !"Dwarf Version", i32 2}
!30 = !{i32 1, !"Debug Info Version", i32 3}
!31 = !{!"clang version 3.5 "}
diff --git a/test/Linker/type-unique-type-array-a.ll b/test/Linker/type-unique-type-array-a.ll
index db532b7f984a..010f478cd3ab 100644
--- a/test/Linker/type-unique-type-array-a.ll
+++ b/test/Linker/type-unique-type-array-a.ll
@@ -56,7 +56,7 @@ entry:
%0 = load %class.A*, %class.A** %a.addr, align 8, !dbg !28
%1 = bitcast %struct.SA* %agg.tmp to i8*, !dbg !28
%2 = bitcast %struct.SA* %sa to i8*, !dbg !28
- call void @llvm.memcpy.p0i8.p0i8.i64(i8* %1, i8* %2, i64 4, i32 4, i1 false), !dbg !28
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %1, i8* align 4 %2, i64 4, i1 false), !dbg !28
%coerce.dive1 = getelementptr %struct.SA, %struct.SA* %agg.tmp, i32 0, i32 0, !dbg !28
%3 = load i32, i32* %coerce.dive1, !dbg !28
call void @_ZN1A5testAE2SA(%class.A* %0, i32 %3), !dbg !28
@@ -81,7 +81,7 @@ entry:
}
; Function Attrs: nounwind
-declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) #3
+declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1) #3
attributes #0 = { ssp uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { nounwind readnone }
@@ -106,12 +106,12 @@ attributes #3 = { nounwind }
!11 = !{!12}
!12 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !1, scope: !10, baseType: !13)
!13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!15 = distinct !DISubprogram(name: "topA", linkageName: "_Z4topAP1A2SA", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 11, file: !1, scope: !16, type: !17, variables: !2)
+!15 = distinct !DISubprogram(name: "topA", linkageName: "_Z4topAP1A2SA", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 11, file: !1, scope: !16, type: !17, retainedNodes: !2)
!16 = !DIFile(filename: "a.cpp", directory: "/Users/manmanren/test-Nov/type_unique/rdar_di_array")
!17 = !DISubroutineType(types: !18)
!18 = !{null, !19, !10}
!19 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4)
-!20 = distinct !DISubprogram(name: "testA", linkageName: "_ZN1A5testAE2SA", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !4, type: !7, declaration: !6, variables: !2)
+!20 = distinct !DISubprogram(name: "testA", linkageName: "_ZN1A5testAE2SA", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !4, type: !7, declaration: !6, retainedNodes: !2)
!21 = !{i32 2, !"Dwarf Version", i32 2}
!22 = !{i32 2, !"Debug Info Version", i32 3}
!23 = !{!"clang version 3.5.0 (trunk 214102:214113M) (llvm/trunk 214102:214115M)"}
diff --git a/test/Linker/type-unique-type-array-b.ll b/test/Linker/type-unique-type-array-b.ll
index e96b5f58ca97..18f06b56a3c3 100644
--- a/test/Linker/type-unique-type-array-b.ll
+++ b/test/Linker/type-unique-type-array-b.ll
@@ -35,7 +35,7 @@ entry:
%0 = load %class.B*, %class.B** %b.addr, align 8, !dbg !28
%1 = bitcast %struct.SA* %agg.tmp to i8*, !dbg !28
%2 = bitcast %struct.SA* %sa to i8*, !dbg !28
- call void @llvm.memcpy.p0i8.p0i8.i64(i8* %1, i8* %2, i64 4, i32 4, i1 false), !dbg !28
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %1, i8* align 4 %2, i64 4, i1 false), !dbg !28
%coerce.dive1 = getelementptr %struct.SA, %struct.SA* %agg.tmp, i32 0, i32 0, !dbg !28
%3 = load i32, i32* %coerce.dive1, !dbg !28
call void @_ZN1B5testBE2SA(%class.B* %0, i32 %3), !dbg !28
@@ -60,7 +60,7 @@ entry:
}
; Function Attrs: nounwind
-declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) #3
+declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1) #3
attributes #0 = { ssp uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { nounwind readnone }
@@ -85,12 +85,12 @@ attributes #3 = { nounwind }
!11 = !{!12}
!12 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !1, scope: !10, baseType: !13)
!13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!15 = distinct !DISubprogram(name: "topB", linkageName: "_Z4topBP1B2SA", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 11, file: !1, scope: !16, type: !17, variables: !2)
+!15 = distinct !DISubprogram(name: "topB", linkageName: "_Z4topBP1B2SA", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 11, file: !1, scope: !16, type: !17, retainedNodes: !2)
!16 = !DIFile(filename: "b.cpp", directory: "/Users/manmanren/test-Nov/type_unique/rdar_di_array")
!17 = !DISubroutineType(types: !18)
!18 = !{null, !19, !10}
!19 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4)
-!20 = distinct !DISubprogram(name: "testB", linkageName: "_ZN1B5testBE2SA", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !4, type: !7, declaration: !6, variables: !2)
+!20 = distinct !DISubprogram(name: "testB", linkageName: "_ZN1B5testBE2SA", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !4, type: !7, declaration: !6, retainedNodes: !2)
!21 = !{i32 2, !"Dwarf Version", i32 2}
!22 = !{i32 2, !"Debug Info Version", i32 3}
!23 = !{!"clang version 3.5.0 (trunk 214102:214113M) (llvm/trunk 214102:214115M)"}