DebugInfo: Fix bad debug info for compile units and types
Fix debug info in these tests, which started failing with a WIP patch to
verify compile units and types. The problems look like they were all
caused by bitrot. They fell into these categories:
- Using `!{i32 0}` instead of `!{}`.
- Using `!{null}` instead of `!{}`.
- Using `!MDExpression()` instead of `!{}`.
- Using `!8` instead of `!{!8}`.
- `file:` references that pointed at `MDCompileUnit`s instead of the
same `MDFile` as the compile unit.
- `file:` references that were numerically off-by-one or (off-by-ten).
llvm-svn: 233415
diff --git a/llvm/test/Linker/2011-08-04-DebugLoc.ll b/llvm/test/Linker/2011-08-04-DebugLoc.ll
index 18fa7da..25d08cd 100644
--- a/llvm/test/Linker/2011-08-04-DebugLoc.ll
+++ b/llvm/test/Linker/2011-08-04-DebugLoc.ll
@@ -26,6 +26,6 @@
!6 = !MDLocation(line: 2, column: 13, scope: !7)
!7 = distinct !MDLexicalBlock(line: 2, column: 11, file: !8, scope: !1)
!8 = !MDFile(filename: "a.c", directory: "/private/tmp")
-!9 = !{i32 0}
+!9 = !{}
!10 = !{!1}
!11 = !{i32 1, !"Debug Info Version", i32 3}
diff --git a/llvm/test/Linker/2011-08-04-DebugLoc2.ll b/llvm/test/Linker/2011-08-04-DebugLoc2.ll
index 93eb61d..76e73dd 100644
--- a/llvm/test/Linker/2011-08-04-DebugLoc2.ll
+++ b/llvm/test/Linker/2011-08-04-DebugLoc2.ll
@@ -23,6 +23,6 @@
!6 = !MDLocation(line: 1, column: 13, scope: !7)
!7 = distinct !MDLexicalBlock(line: 1, column: 11, file: !8, scope: !1)
!8 = !MDFile(filename: "b.c", directory: "/private/tmp")
-!9 = !{i32 0}
+!9 = !{}
!10 = !{!1}
!11 = !{i32 1, !"Debug Info Version", i32 3}
diff --git a/llvm/test/Linker/2011-08-04-Metadata.ll b/llvm/test/Linker/2011-08-04-Metadata.ll
index 2a1711a..7b39800 100644
--- a/llvm/test/Linker/2011-08-04-Metadata.ll
+++ b/llvm/test/Linker/2011-08-04-Metadata.ll
@@ -24,7 +24,7 @@
!llvm.dbg.sp = !{!1}
!llvm.dbg.gv = !{!5}
-!0 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: true, emissionKind: 0, file: !9, enums: !4, retainedTypes: !4, subprograms: !10)
+!0 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: true, emissionKind: 0, file: !9, enums: !{}, retainedTypes: !{}, subprograms: !10)
!1 = !MDSubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !9, scope: !2, type: !3, function: void ()* @foo)
!2 = !MDFile(filename: "/tmp/one.c", directory: "/Volumes/Lalgate/Slate/D")
!3 = !MDSubroutineType(types: !4)
diff --git a/llvm/test/Linker/2011-08-04-Metadata2.ll b/llvm/test/Linker/2011-08-04-Metadata2.ll
index e62c122..ba8c6db 100644
--- a/llvm/test/Linker/2011-08-04-Metadata2.ll
+++ b/llvm/test/Linker/2011-08-04-Metadata2.ll
@@ -19,7 +19,7 @@
!llvm.dbg.sp = !{!1}
!llvm.dbg.gv = !{!5}
-!0 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: true, emissionKind: 0, file: !9, enums: !4, retainedTypes: !4, subprograms: !10)
+!0 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 ()", isOptimized: true, emissionKind: 0, file: !9, enums: !{}, retainedTypes: !{}, subprograms: !10)
!1 = !MDSubprogram(name: "bar", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !9, scope: !2, type: !3, function: void ()* @bar)
!2 = !MDFile(filename: "/tmp/two.c", directory: "/Volumes/Lalgate/Slate/D")
!3 = !MDSubroutineType(types: !4)
diff --git a/llvm/test/Linker/2011-08-18-unique-class-type.ll b/llvm/test/Linker/2011-08-18-unique-class-type.ll
index 4ffb249..ee62e40 100644
--- a/llvm/test/Linker/2011-08-18-unique-class-type.ll
+++ b/llvm/test/Linker/2011-08-18-unique-class-type.ll
@@ -22,7 +22,7 @@
!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 (trunk 137954)", isOptimized: true, emissionKind: 0, file: !16, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2)
!1 = !{!2}
-!2 = !{i32 0}
+!2 = !{}
!3 = !{!5}
!5 = !MDSubprogram(name: "foo", linkageName: "_Z3fooN2N11AE", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, file: !16, scope: !6, type: !7, function: void ()* @_Z3fooN2N11AE)
!6 = !MDFile(filename: "n1.c", directory: "/private/tmp")
diff --git a/llvm/test/Linker/2011-08-18-unique-class-type2.ll b/llvm/test/Linker/2011-08-18-unique-class-type2.ll
index da75160..a603aee 100644
--- a/llvm/test/Linker/2011-08-18-unique-class-type2.ll
+++ b/llvm/test/Linker/2011-08-18-unique-class-type2.ll
@@ -20,7 +20,7 @@
!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 (trunk 137954)", isOptimized: true, emissionKind: 0, file: !16, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2)
!1 = !{!2}
-!2 = !{i32 0}
+!2 = !{}
!3 = !{!5}
!5 = !MDSubprogram(name: "bar", linkageName: "_Z3barN2N11AE", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scope: !6, type: !7, function: void ()* @_Z3barN2N11AE)
!6 = !MDFile(filename: "n2.c", directory: "/private/tmp")
diff --git a/llvm/test/Linker/2011-08-18-unique-debug-type.ll b/llvm/test/Linker/2011-08-18-unique-debug-type.ll
index 7184d52..a8ccd27 100644
--- a/llvm/test/Linker/2011-08-18-unique-debug-type.ll
+++ b/llvm/test/Linker/2011-08-18-unique-debug-type.ll
@@ -14,7 +14,7 @@
!0 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 137954)", isOptimized: true, emissionKind: 0, file: !12, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2)
!1 = !{!2}
-!2 = !{i32 0}
+!2 = !{}
!3 = !{!5}
!5 = !MDSubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !12, scope: !6, type: !7, function: i32 ()* @foo)
!6 = !MDFile(filename: "one.c", directory: "/private/tmp")
diff --git a/llvm/test/Linker/2011-08-18-unique-debug-type2.ll b/llvm/test/Linker/2011-08-18-unique-debug-type2.ll
index 2b04560..242f953 100644
--- a/llvm/test/Linker/2011-08-18-unique-debug-type2.ll
+++ b/llvm/test/Linker/2011-08-18-unique-debug-type2.ll
@@ -14,7 +14,7 @@
!0 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 137954)", isOptimized: true, emissionKind: 0, file: !12, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2)
!1 = !{!2}
-!2 = !{i32 0}
+!2 = !{}
!3 = !{!5}
!5 = !MDSubprogram(name: "bar", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !12, scope: !6, type: !7, function: i32 ()* @bar)
!6 = !MDFile(filename: "two.c", directory: "/private/tmp")
diff --git a/llvm/test/Linker/DbgDeclare.ll b/llvm/test/Linker/DbgDeclare.ll
index 9afb8fb..a335490 100644
--- a/llvm/test/Linker/DbgDeclare.ll
+++ b/llvm/test/Linker/DbgDeclare.ll
@@ -39,7 +39,7 @@
!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 173515)", isOptimized: true, emissionKind: 0, file: !20, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2)
!1 = !{!2}
-!2 = !{i32 0}
+!2 = !{}
!3 = !{!5}
!5 = !MDSubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !20, scope: null, type: !7, function: i32 (i32, i8**)* @main, variables: !1)
!6 = !MDFile(filename: "main.cpp", directory: "/private/tmp")
diff --git a/llvm/test/Linker/DbgDeclare2.ll b/llvm/test/Linker/DbgDeclare2.ll
index 107d8c1..a5ae916 100644
--- a/llvm/test/Linker/DbgDeclare2.ll
+++ b/llvm/test/Linker/DbgDeclare2.ll
@@ -52,7 +52,7 @@
!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 173515)", isOptimized: true, emissionKind: 0, file: !25, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2)
!1 = !{!2}
-!2 = !{i32 0}
+!2 = !{}
!3 = !{!5}
!5 = !MDSubprogram(name: "print_args", linkageName: "test", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !26, scope: null, type: !7, function: void (i32, i8**)* @test, variables: !1)
!6 = !MDFile(filename: "test.cpp", directory: "/private/tmp")
diff --git a/llvm/test/Linker/Inputs/type-unique-inheritance-a.ll b/llvm/test/Linker/Inputs/type-unique-inheritance-a.ll
index 2159f98..82f9d55 100644
--- a/llvm/test/Linker/Inputs/type-unique-inheritance-a.ll
+++ b/llvm/test/Linker/Inputs/type-unique-inheritance-a.ll
@@ -68,7 +68,7 @@
!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (http://llvm.org/git/clang.git f54e02f969d02d640103db73efc30c45439fceab) (http://llvm.org/git/llvm.git 284353b55896cb1babfaa7add7c0a363245342d2)", isOptimized: false, emissionKind: 0, file: !1, enums: !2, retainedTypes: !3, subprograms: !14, globals: !2, imports: !2)
!1 = !MDFile(filename: "foo.cpp", directory: "/Users/mren/c_testing/type_unique_air/inher")
-!2 = !{i32 0}
+!2 = !{}
!3 = !{!4, !8}
!4 = !MDCompositeType(tag: DW_TAG_class_type, name: "A", line: 3, size: 64, align: 32, file: !5, elements: !6, identifier: "_ZTS1A")
!5 = !MDFile(filename: "./a.hpp", directory: "/Users/mren/c_testing/type_unique_air/inher")
diff --git a/llvm/test/Linker/Inputs/type-unique-inheritance-b.ll b/llvm/test/Linker/Inputs/type-unique-inheritance-b.ll
index f16ae1a..2a27d7c 100644
--- a/llvm/test/Linker/Inputs/type-unique-inheritance-b.ll
+++ b/llvm/test/Linker/Inputs/type-unique-inheritance-b.ll
@@ -42,7 +42,7 @@
!0 = !MDCompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (http://llvm.org/git/clang.git f54e02f969d02d640103db73efc30c45439fceab) (http://llvm.org/git/llvm.git 284353b55896cb1babfaa7add7c0a363245342d2)", isOptimized: false, emissionKind: 0, file: !1, enums: !2, retainedTypes: !3, subprograms: !19, globals: !2, imports: !2)
!1 = !MDFile(filename: "bar.cpp", directory: "/Users/mren/c_testing/type_unique_air/inher")
-!2 = !{i32 0}
+!2 = !{}
!3 = !{!4, !11, !15}
!4 = !MDCompositeType(tag: DW_TAG_class_type, name: "B", line: 7, size: 128, align: 64, file: !5, elements: !6, identifier: "_ZTS1B")
!5 = !MDFile(filename: "./b.hpp", directory: "/Users/mren/c_testing/type_unique_air/inher")