DI: Require subprogram definitions to be distinct
[oota-llvm.git] / test / Linker / Inputs / subprogram-linkonce-weak.ll
index 1bc440abc3dec11859bea703d71f07b260c35c5d..8fcb00c36e28b8322e9ef4768269b1289082af25 100644 (file)
@@ -1,7 +1,7 @@
 define weak i32 @foo(i32 %a, i32 %b) {
 entry:
-  %sum = call i32 @fastadd(i32 %a, i32 %b), !dbg !MDLocation(line: 2, scope: !3)
-  ret i32 %sum, !dbg !MDLocation(line: 3, scope: !3)
+  %sum = call i32 @fastadd(i32 %a, i32 %b), !dbg !DILocation(line: 52, scope: !3)
+  ret i32 %sum, !dbg !DILocation(line: 53, scope: !3)
 }
 
 declare i32 @fastadd(i32, i32)
@@ -10,7 +10,7 @@ declare i32 @fastadd(i32, i32)
 !0 = !{i32 2, !"Debug Info Version", i32 3}
 
 !llvm.dbg.cu = !{!1}
-!1 = !MDCompileUnit(language: DW_LANG_C99, file: !2, subprograms: !{!3}, emissionKind: 2)
-!2 = !MDFile(filename: "foo.c", directory: "/path/to/dir")
-!3 = !MDSubprogram(file: !2, scope: !2, line: 1, name: "foo", function: i32 (i32, i32)* @foo, type: !4)
-!4 = !MDSubroutineType(types: !{})
+!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, subprograms: !{!3}, emissionKind: 1)
+!2 = !DIFile(filename: "foo.c", directory: "/path/to/dir")
+!3 = distinct !DISubprogram(file: !2, scope: !2, line: 51, name: "foo", function: i32 (i32, i32)* @foo, type: !4)
+!4 = !DISubroutineType(types: !{})