summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/Generic
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/DebugInfo/Generic')
-rw-r--r--llvm/test/DebugInfo/Generic/2009-11-05-DeadGlobalVariable.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/2009-11-10-CurrentFn.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/2010-03-24-MemberFn.ll8
-rw-r--r--llvm/test/DebugInfo/Generic/2010-04-06-NestedFnDbgInfo.ll12
-rw-r--r--llvm/test/DebugInfo/Generic/2010-04-19-FramePtr.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/2010-05-10-MultipleCU.ll8
-rw-r--r--llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/2010-07-19-Crash.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/2010-10-01-crash.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/Inputs/gmlt.ll16
-rw-r--r--llvm/test/DebugInfo/Generic/PR20038.ll12
-rw-r--r--llvm/test/DebugInfo/Generic/array.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/block-asan.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/constant-pointers.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/constant-sdnodes-have-dbg-location.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/constantfp-sdnodes-have-dbg-location.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/cross-cu-inlining.ll8
-rw-r--r--llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll6
-rw-r--r--llvm/test/DebugInfo/Generic/cross-cu-linkonce.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/cu-range-hole.ll8
-rw-r--r--llvm/test/DebugInfo/Generic/cu-ranges.ll8
-rw-r--r--llvm/test/DebugInfo/Generic/dead-argument-order.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/debug-info-qualifiers.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/debuginfofinder-multiple-cu.ll8
-rw-r--r--llvm/test/DebugInfo/Generic/def-line.ll12
-rw-r--r--llvm/test/DebugInfo/Generic/dwarf-public-names.ll16
-rw-r--r--llvm/test/DebugInfo/Generic/enum-types.ll8
-rw-r--r--llvm/test/DebugInfo/Generic/enum.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/global.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/gvn.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/incorrect-variable-debugloc.ll8
-rw-r--r--llvm/test/DebugInfo/Generic/incorrect-variable-debugloc1.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/inline-debug-info-multiret.ll8
-rw-r--r--llvm/test/DebugInfo/Generic/inline-debug-info.ll8
-rw-r--r--llvm/test/DebugInfo/Generic/inline-no-debug-info.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/inline-scopes.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/inlined-arguments.ll8
-rw-r--r--llvm/test/DebugInfo/Generic/inlined-vars.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/location-verifier.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/lto-comp-dir.ll8
-rw-r--r--llvm/test/DebugInfo/Generic/member-order.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/missing-abstract-variable.ll8
-rw-r--r--llvm/test/DebugInfo/Generic/multiline.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/namespace.ll26
-rw-r--r--llvm/test/DebugInfo/Generic/namespace_function_definition.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/namespace_inline_function_definition.ll8
-rw-r--r--llvm/test/DebugInfo/Generic/piece-verifier.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/recursive_inlining.ll20
-rw-r--r--llvm/test/DebugInfo/Generic/restrict.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/sugared-constants.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/tu-composite.ll8
-rw-r--r--llvm/test/DebugInfo/Generic/two-cus-from-same-file.ll8
-rw-r--r--llvm/test/DebugInfo/Generic/unconditional-branch.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/varargs.ll4
-rw-r--r--llvm/test/DebugInfo/Generic/version.ll4
55 files changed, 186 insertions, 186 deletions
diff --git a/llvm/test/DebugInfo/Generic/2009-11-05-DeadGlobalVariable.ll b/llvm/test/DebugInfo/Generic/2009-11-05-DeadGlobalVariable.ll
index 3791005dcfe..40dacf8848b 100644
--- a/llvm/test/DebugInfo/Generic/2009-11-05-DeadGlobalVariable.ll
+++ b/llvm/test/DebugInfo/Generic/2009-11-05-DeadGlobalVariable.ll
@@ -2,7 +2,7 @@
; Here variable bar is optimized away. Do not trip over while trying to generate debug info.
-define i32 @foo() nounwind uwtable readnone ssp {
+define i32 @foo() nounwind uwtable readnone ssp !dbg !5 {
entry:
ret i32 42, !dbg !15
}
@@ -13,7 +13,7 @@ entry:
!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 139632)", isOptimized: true, emissionKind: 0, file: !17, enums: !1, retainedTypes: !1, subprograms: !3, globals: !12)
!1 = !{}
!3 = !{!5}
-!5 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !17, scope: !6, type: !7, function: i32 ()* @foo)
+!5 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !17, scope: !6, type: !7)
!6 = !DIFile(filename: "fb.c", directory: "/private/tmp")
!7 = !DISubroutineType(types: !8)
!8 = !{!9}
diff --git a/llvm/test/DebugInfo/Generic/2009-11-10-CurrentFn.ll b/llvm/test/DebugInfo/Generic/2009-11-10-CurrentFn.ll
index 7817a73ed97..b0961135ebf 100644
--- a/llvm/test/DebugInfo/Generic/2009-11-10-CurrentFn.ll
+++ b/llvm/test/DebugInfo/Generic/2009-11-10-CurrentFn.ll
@@ -1,6 +1,6 @@
; RUN: llc < %s -o /dev/null
-define void @bar(i32 %i) nounwind uwtable ssp {
+define void @bar(i32 %i) nounwind uwtable ssp !dbg !5 {
entry:
tail call void (...) @foo() nounwind, !dbg !14
ret void, !dbg !16
@@ -16,7 +16,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 139632)", isOptimized: true, emissionKind: 0, file: !17, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1)
!1 = !{}
!3 = !{!5}
-!5 = distinct !DISubprogram(name: "bar", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, file: !17, scope: !6, type: !7, function: void (i32)* @bar, variables: !9)
+!5 = distinct !DISubprogram(name: "bar", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, file: !17, scope: !6, type: !7, variables: !9)
!6 = !DIFile(filename: "cf.c", directory: "/private/tmp")
!7 = !DISubroutineType(types: !8)
!8 = !{null}
diff --git a/llvm/test/DebugInfo/Generic/2010-03-24-MemberFn.ll b/llvm/test/DebugInfo/Generic/2010-03-24-MemberFn.ll
index 298c30e3de2..5f63ce295fa 100644
--- a/llvm/test/DebugInfo/Generic/2010-03-24-MemberFn.ll
+++ b/llvm/test/DebugInfo/Generic/2010-03-24-MemberFn.ll
@@ -2,7 +2,7 @@
; Here _ZN1S3fooEv is defined in header file identified as AT_decl_file no. 2 in debug info.
%struct.S = type <{ i8 }>
-define i32 @_Z3barv() nounwind ssp {
+define i32 @_Z3barv() nounwind ssp !dbg !3 {
entry:
%retval = alloca i32 ; <i32*> [#uses=2]
%0 = alloca i32 ; <i32*> [#uses=2]
@@ -20,7 +20,7 @@ return: ; preds = %entry
ret i32 %retval1, !dbg !16
}
-define linkonce_odr i32 @_ZN1S3fooEv(%struct.S* %this) nounwind ssp align 2 {
+define linkonce_odr i32 @_ZN1S3fooEv(%struct.S* %this) nounwind ssp align 2 !dbg !12 {
entry:
%this_addr = alloca %struct.S* ; <%struct.S**> [#uses=1]
%retval = alloca i32 ; <i32*> [#uses=1]
@@ -42,7 +42,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
!0 = !DILocalVariable(name: "s1", line: 3, scope: !1, file: !4, type: !9)
!1 = distinct !DILexicalBlock(line: 3, column: 0, file: !25, scope: !2)
!2 = distinct !DILexicalBlock(line: 3, column: 0, file: !25, scope: !3)
-!3 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barv", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 3, file: !25, scope: !4, type: !6, function: i32 ()* @_Z3barv)
+!3 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barv", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 3, file: !25, scope: !4, type: !6)
!4 = !DIFile(filename: "one.cc", directory: "/tmp/")
!5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: 0, file: !25, enums: !27, retainedTypes: !27, subprograms: !24, imports: null)
!6 = !DISubroutineType(types: !7)
@@ -51,7 +51,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
!9 = !DICompositeType(tag: DW_TAG_structure_type, name: "S", line: 2, size: 8, align: 8, file: !26, scope: !4, elements: !11)
!10 = !DIFile(filename: "one.h", directory: "/tmp/")
!11 = !{!12}
-!12 = distinct !DISubprogram(name: "foo", linkageName: "_ZN1S3fooEv", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 3, file: !26, scope: !9, type: !13, function: i32 (%struct.S*)* @_ZN1S3fooEv)
+!12 = distinct !DISubprogram(name: "foo", linkageName: "_ZN1S3fooEv", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 3, file: !26, scope: !9, type: !13)
!13 = !DISubroutineType(types: !14)
!14 = !{!8, !15}
!15 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, file: !25, scope: !4, baseType: !9)
diff --git a/llvm/test/DebugInfo/Generic/2010-04-06-NestedFnDbgInfo.ll b/llvm/test/DebugInfo/Generic/2010-04-06-NestedFnDbgInfo.ll
index fd9124ad00a..a85ad9adcf7 100644
--- a/llvm/test/DebugInfo/Generic/2010-04-06-NestedFnDbgInfo.ll
+++ b/llvm/test/DebugInfo/Generic/2010-04-06-NestedFnDbgInfo.ll
@@ -21,7 +21,7 @@
%class.A = type { i8 }
%class.B = type { i8 }
-define i32 @main() ssp {
+define i32 @main() ssp !dbg !2 {
entry:
%retval = alloca i32, align 4 ; <i32*> [#uses=3]
%b = alloca %class.A, align 1 ; <%class.A*> [#uses=1]
@@ -35,7 +35,7 @@ entry:
declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
-define linkonce_odr i32 @_ZN1B2fnEv(%class.A* %this) ssp align 2 {
+define linkonce_odr i32 @_ZN1B2fnEv(%class.A* %this) ssp align 2 !dbg !10 {
entry:
%retval = alloca i32, align 4 ; <i32*> [#uses=2]
%this.addr = alloca %class.A*, align 8 ; <%class.A**> [#uses=2]
@@ -54,7 +54,7 @@ entry:
ret i32 %0, !dbg !32
}
-define internal i32 @_ZZN1B2fnEvEN1A3fooEv(%class.A* %this) ssp align 2 {
+define internal i32 @_ZZN1B2fnEvEN1A3fooEv(%class.A* %this) ssp align 2 !dbg !23 {
entry:
%retval = alloca i32, align 4 ; <i32*> [#uses=2]
%this.addr = alloca %class.A*, align 8 ; <%class.A**> [#uses=2]
@@ -72,7 +72,7 @@ entry:
!0 = !DILocalVariable(name: "b", line: 16, scope: !1, file: !3, type: !8)
!1 = distinct !DILexicalBlock(line: 15, column: 12, file: !38, scope: !2)
-!2 = distinct !DISubprogram(name: "main", linkageName: "main", line: 15, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 15, file: !38, scope: !3, type: !5, function: i32 ()* @main)
+!2 = distinct !DISubprogram(name: "main", linkageName: "main", line: 15, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 15, file: !38, scope: !3, type: !5)
!3 = !DIFile(filename: "one.cc", directory: "/tmp")
!4 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang 1.5", isOptimized: false, emissionKind: 0, file: !38, enums: !39, retainedTypes: !39, subprograms: !37, imports: null)
!5 = !DISubroutineType(types: !6)
@@ -80,7 +80,7 @@ entry:
!7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!8 = !DICompositeType(tag: DW_TAG_class_type, name: "B", line: 2, size: 8, align: 8, file: !38, scope: !3, elements: !9)
!9 = !{!10}
-!10 = distinct !DISubprogram(name: "fn", linkageName: "_ZN1B2fnEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 4, file: !38, scope: !8, type: !11, function: i32 (%class.A*)* @_ZN1B2fnEv)
+!10 = distinct !DISubprogram(name: "fn", linkageName: "_ZN1B2fnEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 4, file: !38, scope: !8, type: !11)
!11 = !DISubroutineType(types: !12)
!12 = !{!7, !13}
!13 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, file: !38, scope: !3, baseType: !8)
@@ -93,7 +93,7 @@ entry:
!20 = distinct !DILexicalBlock(line: 4, column: 12, file: !38, scope: !10)
!21 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 5, size: 8, align: 8, file: !38, scope: !10, elements: !22)
!22 = !{!23}
-!23 = distinct !DISubprogram(name: "foo", linkageName: "_ZZN1B2fnEvEN1A3fooEv", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 7, file: !38, scope: !21, type: !24, function: i32 (%class.A*)* @_ZZN1B2fnEvEN1A3fooEv)
+!23 = distinct !DISubprogram(name: "foo", linkageName: "_ZZN1B2fnEvEN1A3fooEv", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 7, file: !38, scope: !21, type: !24)
!24 = !DISubroutineType(types: !25)
!25 = !{!7, !26}
!26 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, file: !38, scope: !3, baseType: !21)
diff --git a/llvm/test/DebugInfo/Generic/2010-04-19-FramePtr.ll b/llvm/test/DebugInfo/Generic/2010-04-19-FramePtr.ll
index 0b4cee03b25..3b7280028c0 100644
--- a/llvm/test/DebugInfo/Generic/2010-04-19-FramePtr.ll
+++ b/llvm/test/DebugInfo/Generic/2010-04-19-FramePtr.ll
@@ -4,7 +4,7 @@
; RUN: grep -v DW_AT_APPLE_omit_frame_ptr %t
-define i32 @foo() nounwind ssp {
+define i32 @foo() nounwind ssp !dbg !1 {
entry:
%retval = alloca i32 ; <i32*> [#uses=2]
%0 = alloca i32 ; <i32*> [#uses=2]
@@ -24,7 +24,7 @@ return: ; preds = %entry
!9 = !{!1}
!0 = !DILocation(line: 2, scope: !1)
-!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 2, file: !10, scope: null, type: !4, function: i32 ()* @foo)
+!1 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 2, file: !10, scope: null, type: !4)
!2 = !DIFile(filename: "a.c", directory: "/tmp")
!3 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: 0, file: !10, enums: !11, retainedTypes: !11, subprograms: !9, imports: null)
!4 = !DISubroutineType(types: !5)
diff --git a/llvm/test/DebugInfo/Generic/2010-05-10-MultipleCU.ll b/llvm/test/DebugInfo/Generic/2010-05-10-MultipleCU.ll
index 92277a97d21..486dbf0e940 100644
--- a/llvm/test/DebugInfo/Generic/2010-05-10-MultipleCU.ll
+++ b/llvm/test/DebugInfo/Generic/2010-05-10-MultipleCU.ll
@@ -7,12 +7,12 @@
; CHECK: Compile Unit:
; CHECK: Compile Unit:
-define i32 @foo() nounwind readnone ssp {
+define i32 @foo() nounwind readnone ssp !dbg !2 {
return:
ret i32 42, !dbg !0
}
-define i32 @bar() nounwind readnone ssp {
+define i32 @bar() nounwind readnone ssp !dbg !10 {
return:
ret i32 21, !dbg !8
}
@@ -24,7 +24,7 @@ return:
!0 = !DILocation(line: 3, scope: !1)
!1 = distinct !DILexicalBlock(line: 2, column: 0, file: !18, scope: !2)
-!2 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !18, scope: !3, type: !5, function: i32 ()* @foo)
+!2 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !18, scope: !3, type: !5)
!3 = !DIFile(filename: "a.c", directory: "/tmp/")
!4 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: 0, file: !18, enums: !19, retainedTypes: !19, subprograms: !16)
!5 = !DISubroutineType(types: !6)
@@ -32,7 +32,7 @@ return:
!7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!8 = !DILocation(line: 3, scope: !9)
!9 = distinct !DILexicalBlock(line: 2, column: 0, file: !20, scope: !10)
-!10 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !20, scope: !11, type: !13, function: i32 ()* @bar)
+!10 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !20, scope: !11, type: !13)
!11 = !DIFile(filename: "b.c", directory: "/tmp/")
!12 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: 0, file: !20, enums: !19, retainedTypes: !19, subprograms: !17)
!13 = !DISubroutineType(types: !14)
diff --git a/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll b/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll
index feba316213a..f01cf6db905 100644
--- a/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll
+++ b/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll
@@ -12,7 +12,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone
-define i32 @bar() nounwind ssp {
+define i32 @bar() nounwind ssp !dbg !6 {
entry:
%0 = load i32, i32* @i, align 4, !dbg !17 ; <i32> [#uses=2]
tail call void @llvm.dbg.value(metadata i32 %0, i64 0, metadata !59, metadata !DIExpression()), !dbg !19
@@ -31,7 +31,7 @@ entry:
!3 = !DISubroutineType(types: !4)
!4 = !{!5, !5}
!5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!6 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !27, scope: !1, type: !7, function: i32 ()* @bar)
+!6 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !27, scope: !1, type: !7)
!7 = !DISubroutineType(types: !8)
!8 = !{!5}
!9 = !DILocalVariable(name: "j", line: 9, arg: 1, scope: !0, file: !1, type: !5)
diff --git a/llvm/test/DebugInfo/Generic/2010-07-19-Crash.ll b/llvm/test/DebugInfo/Generic/2010-07-19-Crash.ll
index 3189f6fdb74..9565a2f09cb 100644
--- a/llvm/test/DebugInfo/Generic/2010-07-19-Crash.ll
+++ b/llvm/test/DebugInfo/Generic/2010-07-19-Crash.ll
@@ -2,7 +2,7 @@
; PR7662
; Do not add variables to !11 because it is a declaration entry.
-define i32 @bar() nounwind readnone ssp {
+define i32 @bar() nounwind readnone ssp !dbg !0 {
entry:
ret i32 42, !dbg !9
}
@@ -12,7 +12,7 @@ entry:
!llvm.dbg.sp = !{!0, !6, !11}
!llvm.dbg.lv.foo = !{!7}
-!0 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !12, scope: !1, type: !3, function: i32 ()* @bar)
+!0 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !12, scope: !1, type: !3)
!1 = !DIFile(filename: "one.c", directory: "/private/tmp")
!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang 2.8", isOptimized: true, emissionKind: 0, file: !12, enums: !14, retainedTypes: !14, subprograms: !13)
!3 = !DISubroutineType(types: !4)
diff --git a/llvm/test/DebugInfo/Generic/2010-10-01-crash.ll b/llvm/test/DebugInfo/Generic/2010-10-01-crash.ll
index 6ae48f1c408..712c32a7f62 100644
--- a/llvm/test/DebugInfo/Generic/2010-10-01-crash.ll
+++ b/llvm/test/DebugInfo/Generic/2010-10-01-crash.ll
@@ -1,6 +1,6 @@
; RUN: llc -O0 %s -o /dev/null
-define void @CGRectStandardize(i32* sret %agg.result, i32* byval %rect) nounwind ssp {
+define void @CGRectStandardize(i32* sret %agg.result, i32* byval %rect) nounwind ssp !dbg !0 {
entry:
call void @llvm.dbg.declare(metadata i32* %rect, metadata !23, metadata !DIExpression()), !dbg !24
ret void
@@ -13,7 +13,7 @@ declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32,
!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!27}
-!0 = distinct !DISubprogram(name: "CGRectStandardize", linkageName: "CGRectStandardize", line: 54, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !1, scope: null, function: void (i32*, i32*)* @CGRectStandardize)
+!0 = distinct !DISubprogram(name: "CGRectStandardize", linkageName: "CGRectStandardize", line: 54, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !1, scope: null)
!1 = !DIFile(filename: "GSFusedSilica.m", directory: "/Volumes/Data/Users/sabre/Desktop")
!2 = distinct !DICompileUnit(language: DW_LANG_ObjC, producer: "clang version 2.9 (trunk 115292)", isOptimized: true, runtimeVersion: 1, emissionKind: 0, file: !25, enums: !26, retainedTypes: !26, subprograms: !{!0})
!5 = !DIDerivedType(tag: DW_TAG_typedef, name: "CGRect", line: 49, file: !25, baseType: null)
diff --git a/llvm/test/DebugInfo/Generic/Inputs/gmlt.ll b/llvm/test/DebugInfo/Generic/Inputs/gmlt.ll
index d73fef3b1de..b03a80b4dea 100644
--- a/llvm/test/DebugInfo/Generic/Inputs/gmlt.ll
+++ b/llvm/test/DebugInfo/Generic/Inputs/gmlt.ll
@@ -98,26 +98,26 @@
; CHECK: .apple{{.*}} contents:
; Function Attrs: nounwind uwtable
-define void @_Z2f1v() #0 {
+define void @_Z2f1v() #0 !dbg !4 {
entry:
ret void, !dbg !13
}
; Function Attrs: nounwind uwtable
-define void @_Z2f2v() #0 section "__TEXT,__bar" {
+define void @_Z2f2v() #0 section "__TEXT,__bar" !dbg !7 {
entry:
ret void, !dbg !14
}
; Function Attrs: alwaysinline nounwind uwtable
-define void @_Z2f3v() #1 {
+define void @_Z2f3v() #1 !dbg !8 {
entry:
call void @_Z2f1v(), !dbg !15
ret void, !dbg !16
}
; Function Attrs: nounwind uwtable
-define void @_Z2f4v() #0 {
+define void @_Z2f4v() #0 !dbg !9 {
entry:
call void @_Z2f1v() #2, !dbg !17
ret void, !dbg !19
@@ -135,12 +135,12 @@ attributes #2 = { nounwind }
!1 = !DIFile(filename: "gmlt.cpp", directory: "/tmp/dbginfo")
!2 = !{}
!3 = !{!4, !7, !8, !9}
-!4 = distinct !DISubprogram(name: "f1", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, function: void ()* @_Z2f1v, variables: !2)
+!4 = distinct !DISubprogram(name: "f1", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2)
!5 = !DIFile(filename: "gmlt.cpp", directory: "/tmp/dbginfo")
!6 = !DISubroutineType(types: !2)
-!7 = distinct !DISubprogram(name: "f2", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, function: void ()* @_Z2f2v, variables: !2)
-!8 = distinct !DISubprogram(name: "f3", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, function: void ()* @_Z2f3v, variables: !2)
-!9 = distinct !DISubprogram(name: "f4", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: !5, type: !6, function: void ()* @_Z2f4v, variables: !2)
+!7 = distinct !DISubprogram(name: "f2", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2)
+!8 = distinct !DISubprogram(name: "f3", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2)
+!9 = distinct !DISubprogram(name: "f4", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !2)
!10 = !{i32 2, !"Dwarf Version", i32 4}
!11 = !{i32 2, !"Debug Info Version", i32 3}
!12 = !{!"clang version 3.6.0 "}
diff --git a/llvm/test/DebugInfo/Generic/PR20038.ll b/llvm/test/DebugInfo/Generic/PR20038.ll
index 8ad6d7834be..3e9145f03e8 100644
--- a/llvm/test/DebugInfo/Generic/PR20038.ll
+++ b/llvm/test/DebugInfo/Generic/PR20038.ll
@@ -55,7 +55,7 @@
@b = external global i8
; Function Attrs: nounwind
-define void @_Z4fun4v() #0 {
+define void @_Z4fun4v() #0 !dbg !12 {
entry:
%this.addr.i.i = alloca %struct.C*, align 8, !dbg !21
%this.addr.i = alloca %struct.C*, align 8, !dbg !22
@@ -89,7 +89,7 @@ cleanup.done: ; preds = %cleanup.action, %la
}
; Function Attrs: alwaysinline nounwind
-define void @_ZN1CD1Ev(%struct.C* %this) unnamed_addr #1 align 2 {
+define void @_ZN1CD1Ev(%struct.C* %this) unnamed_addr #1 align 2 !dbg !17 {
entry:
%this.addr.i = alloca %struct.C*, align 8, !dbg !37
%this.addr = alloca %struct.C*, align 8
@@ -103,7 +103,7 @@ entry:
}
; Function Attrs: alwaysinline nounwind
-define void @_ZN1CD2Ev(%struct.C* %this) unnamed_addr #1 align 2 {
+define void @_ZN1CD2Ev(%struct.C* %this) unnamed_addr #1 align 2 !dbg !16 {
entry:
%this.addr = alloca %struct.C*, align 8
store %struct.C* %this, %struct.C** %this.addr, align 8
@@ -135,12 +135,12 @@ attributes #2 = { nounwind readnone }
!9 = !{null, !10}
!10 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1C")
!11 = !{!12, !16, !17}
-!12 = distinct !DISubprogram(name: "fun4", linkageName: "_Z4fun4v", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !5, scope: !13, type: !14, function: void ()* @_Z4fun4v, variables: !2)
+!12 = distinct !DISubprogram(name: "fun4", linkageName: "_Z4fun4v", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !5, scope: !13, type: !14, variables: !2)
!13 = !DIFile(filename: "PR20038.cpp", directory: "/tmp/dbginfo")
!14 = !DISubroutineType(types: !15)
!15 = !{null}
-!16 = distinct !DISubprogram(name: "~C", linkageName: "_ZN1CD2Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !5, scope: !"_ZTS1C", type: !8, function: void (%struct.C*)* @_ZN1CD2Ev, declaration: !7, variables: !2)
-!17 = distinct !DISubprogram(name: "~C", linkageName: "_ZN1CD1Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !5, scope: !"_ZTS1C", type: !8, function: void (%struct.C*)* @_ZN1CD1Ev, declaration: !7, variables: !2)
+!16 = distinct !DISubprogram(name: "~C", linkageName: "_ZN1CD2Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !5, scope: !"_ZTS1C", type: !8, declaration: !7, variables: !2)
+!17 = distinct !DISubprogram(name: "~C", linkageName: "_ZN1CD1Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !5, scope: !"_ZTS1C", type: !8, declaration: !7, variables: !2)
!18 = !{i32 2, !"Dwarf Version", i32 4}
!19 = !{i32 2, !"Debug Info Version", i32 3}
!20 = !{!"clang version 3.5.0 "}
diff --git a/llvm/test/DebugInfo/Generic/array.ll b/llvm/test/DebugInfo/Generic/array.ll
index a9571db23ff..2f181e3b595 100644
--- a/llvm/test/DebugInfo/Generic/array.ll
+++ b/llvm/test/DebugInfo/Generic/array.ll
@@ -1,7 +1,7 @@
; RUN: %llc_dwarf -O0 < %s | FileCheck %s
; Do not emit AT_upper_bound for an unbounded array.
; radar 9241695
-define i32 @main() nounwind ssp {
+define i32 @main() nounwind ssp !dbg !0 {
entry:
%retval = alloca i32, align 4
%a = alloca [0 x i32], align 4
@@ -15,7 +15,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!16}
-!0 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 3, file: !14, scope: !1, type: !3, function: i32 ()* @main)
+!0 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 3, file: !14, scope: !1, type: !3)
!1 = !DIFile(filename: "array.c", directory: "/private/tmp")
!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 129138)", isOptimized: false, emissionKind: 0, file: !14, enums: !15, retainedTypes: !15, subprograms: !13, imports: null)
!3 = !DISubroutineType(types: !4)
diff --git a/llvm/test/DebugInfo/Generic/block-asan.ll b/llvm/test/DebugInfo/Generic/block-asan.ll
index ae07e7b145b..92119631444 100644
--- a/llvm/test/DebugInfo/Generic/block-asan.ll
+++ b/llvm/test/DebugInfo/Generic/block-asan.ll
@@ -20,7 +20,7 @@ target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
%struct.__block_byref_x = type { i8*, %struct.__block_byref_x*, i32, i32, i32 }
; Function Attrs: nounwind ssp uwtable
-define void @foo() #0 {
+define void @foo() #0 !dbg !4 {
entry:
%x = alloca %struct.__block_byref_x, align 8
call void @llvm.dbg.declare(metadata %struct.__block_byref_x* %x, metadata !12, metadata !22), !dbg !23
@@ -62,7 +62,7 @@ attributes #3 = { nounwind }
!1 = !DIFile(filename: "block.c", directory: "/tmp")
!2 = !{}
!3 = !{!4}
-!4 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, function: void ()* @foo, variables: !2)
+!4 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2)
!5 = !DIFile(filename: "block.c", directory: "/tmp")
!6 = !DISubroutineType(types: !7)
!7 = !{null}
diff --git a/llvm/test/DebugInfo/Generic/constant-pointers.ll b/llvm/test/DebugInfo/Generic/constant-pointers.ll
index b46ee5d98f0..af0b6b0743c 100644
--- a/llvm/test/DebugInfo/Generic/constant-pointers.ll
+++ b/llvm/test/DebugInfo/Generic/constant-pointers.ll
@@ -19,7 +19,7 @@
; CHECK: DW_AT_const_value [DW_FORM_udata] (0)
; Function Attrs: nounwind uwtable
-define weak_odr void @_Z4funcILPv0ELPFvvE0ELi42EEvv() #0 {
+define weak_odr void @_Z4funcILPv0ELPFvvE0ELi42EEvv() #0 !dbg !4 {
entry:
ret void, !dbg !18
}
@@ -34,7 +34,7 @@ attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointe
!1 = !DIFile(filename: "constant-pointers.cpp", directory: "/tmp/dbginfo")
!2 = !{}
!3 = !{!4}
-!4 = distinct !DISubprogram(name: "func<nullptr, nullptr, 42>", linkageName: "_Z4funcILPv0ELPFvvE0ELi42EEvv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, function: void ()* @_Z4funcILPv0ELPFvvE0ELi42EEvv, templateParams: !8, variables: !2)
+!4 = distinct !DISubprogram(name: "func<nullptr, nullptr, 42>", linkageName: "_Z4funcILPv0ELPFvvE0ELi42EEvv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, templateParams: !8, variables: !2)
!5 = !DIFile(filename: "constant-pointers.cpp", directory: "/tmp/dbginfo")
!6 = !DISubroutineType(types: !7)
!7 = !{null}
diff --git a/llvm/test/DebugInfo/Generic/constant-sdnodes-have-dbg-location.ll b/llvm/test/DebugInfo/Generic/constant-sdnodes-have-dbg-location.ll
index 7fd9b98ba84..83377418518 100644
--- a/llvm/test/DebugInfo/Generic/constant-sdnodes-have-dbg-location.ll
+++ b/llvm/test/DebugInfo/Generic/constant-sdnodes-have-dbg-location.ll
@@ -3,7 +3,7 @@
; CHECK: t{{[0-9]+}}: i32 = Constant<-1>test.c:4:5
-define i32 @main() {
+define i32 @main() !dbg !4 {
entry:
%retval = alloca i32, align 4
store i32 0, i32* %retval
@@ -17,7 +17,7 @@ entry:
!1 = !DIFile(filename: "test.c", directory: "/home/user/clang-llvm/build")
!2 = !{}
!3 = !{!4}
-!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, function: i32 ()* @main, variables: !2)
+!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, variables: !2)
!5 = !DISubroutineType(types: !6)
!6 = !{!7}
!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
diff --git a/llvm/test/DebugInfo/Generic/constantfp-sdnodes-have-dbg-location.ll b/llvm/test/DebugInfo/Generic/constantfp-sdnodes-have-dbg-location.ll
index cb1dda9738e..6cf9178269c 100644
--- a/llvm/test/DebugInfo/Generic/constantfp-sdnodes-have-dbg-location.ll
+++ b/llvm/test/DebugInfo/Generic/constantfp-sdnodes-have-dbg-location.ll
@@ -3,7 +3,7 @@
; CHECK: t{{[0-9]+}}: f64 = ConstantFP<1.500000e+00>test.c:3:5
-define double @f() {
+define double @f() !dbg !4 {
entry:
ret double 1.500000e+00, !dbg !10
}
@@ -15,7 +15,7 @@ entry:
!1 = !DIFile(filename: "test.c", directory: "/home/user/clang-llvm/build")
!2 = !{}
!3 = !{!4}
-!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, function: double ()* @f, variables: !2)
+!4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, variables: !2)
!5 = !DISubroutineType(types: !6)
!6 = !{!7}
!7 = !DIBasicType(name: "double", size: 64, align: 64, encoding: DW_ATE_float)
diff --git a/llvm/test/DebugInfo/Generic/cross-cu-inlining.ll b/llvm/test/DebugInfo/Generic/cross-cu-inlining.ll
index 6f9436ba1cf..d95b4340060 100644
--- a/llvm/test/DebugInfo/Generic/cross-cu-inlining.ll
+++ b/llvm/test/DebugInfo/Generic/cross-cu-inlining.ll
@@ -66,7 +66,7 @@
@i = external global i32
; Function Attrs: uwtable
-define i32 @main() #0 {
+define i32 @main() #0 !dbg !4 {
entry:
%x.addr.i = alloca i32, align 4
%retval = alloca i32, align 4
@@ -84,7 +84,7 @@ entry:
}
; Function Attrs: alwaysinline nounwind uwtable
-define i32 @_Z4funci(i32 %x) #1 {
+define i32 @_Z4funci(i32 %x) #1 !dbg !12 {
entry:
%x.addr = alloca i32, align 4
store i32 %x, i32* %x.addr, align 4
@@ -116,7 +116,7 @@ attributes #3 = { nounwind }
!1 = !DIFile(filename: "a.cpp", directory: "/tmp/dbginfo")
!2 = !{}
!3 = !{!4}
-!4 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, function: i32 ()* @main, variables: !2)
+!4 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2)
!5 = !DIFile(filename: "a.cpp", directory: "/tmp/dbginfo")
!6 = !DISubroutineType(types: !7)
!7 = !{!8}
@@ -124,7 +124,7 @@ attributes #3 = { nounwind }
!9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: 1, file: !10, enums: !2, retainedTypes: !2, subprograms: !11, globals: !2, imports: !2)
!10 = !DIFile(filename: "b.cpp", directory: "/tmp/dbginfo")
!11 = !{!12}
-!12 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !10, scope: !13, type: !14, function: i32 (i32)* @_Z4funci, variables: !2)
+!12 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !10, scope: !13, type: !14, variables: !2)
!13 = !DIFile(filename: "b.cpp", directory: "/tmp/dbginfo")
!14 = !DISubroutineType(types: !15)
!15 = !{!8, !8}
diff --git a/llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll b/llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll
index 25b6b971bce..1713ea112d4 100644
--- a/llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll
+++ b/llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll
@@ -49,7 +49,7 @@
@y = global i32 (i32)* @_Z4funci, align 8
; Function Attrs: inlinehint nounwind uwtable
-define linkonce_odr i32 @_Z4funci(i32 %i) #0 {
+define linkonce_odr i32 @_Z4funci(i32 %i) #0 !dbg !4 {
%1 = alloca i32, align 4
store i32 %i, i32* %1, align 4
call void @llvm.dbg.declare(metadata i32* %1, metadata !22, metadata !DIExpression()), !dbg !23
@@ -72,7 +72,7 @@ attributes #1 = { nounwind readnone }
!1 = !DIFile(filename: "a.cpp", directory: "/tmp/dbginfo")
!2 = !{}
!3 = !{!4}
-!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, function: i32 (i32)* @_Z4funci, variables: !2)
+!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2)
!5 = !DIFile(filename: "a.cpp", directory: "/tmp/dbginfo")
!6 = !DISubroutineType(types: !7)
!7 = !{!8, !8}
@@ -83,7 +83,7 @@ attributes #1 = { nounwind readnone }
!12 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: 1, file: !13, enums: !2, retainedTypes: !2, subprograms: !14, globals: !17, imports: !2)
!13 = !DIFile(filename: "b.cpp", directory: "/tmp/dbginfo")
!14 = !{!15}
-!15 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !13, scope: !16, type: !6, function: i32 (i32)* @_Z4funci, variables: !2)
+!15 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !13, scope: !16, type: !6, variables: !2)
!16 = !DIFile(filename: "b.cpp", directory: "/tmp/dbginfo")
!17 = !{!18}
!18 = !DIGlobalVariable(name: "y", line: 4, isLocal: false, isDefinition: true, scope: null, file: !16, type: !11, variable: i32 (i32)** @y)
diff --git a/llvm/test/DebugInfo/Generic/cross-cu-linkonce.ll b/llvm/test/DebugInfo/Generic/cross-cu-linkonce.ll
index 50708d7ebe0..983871a1d0f 100644
--- a/llvm/test/DebugInfo/Generic/cross-cu-linkonce.ll
+++ b/llvm/test/DebugInfo/Generic/cross-cu-linkonce.ll
@@ -29,7 +29,7 @@
@y = global i32 (i32)* @_Z4funci, align 8
; Function Attrs: inlinehint nounwind uwtable
-define linkonce_odr i32 @_Z4funci(i32 %i) #0 {
+define linkonce_odr i32 @_Z4funci(i32 %i) #0 !dbg !4 {
%1 = alloca i32, align 4
store i32 %i, i32* %1, align 4
call void @llvm.dbg.declare(metadata i32* %1, metadata !20, metadata !DIExpression()), !dbg !21
@@ -52,7 +52,7 @@ attributes #1 = { nounwind readnone }
!1 = !DIFile(filename: "a.cpp", directory: "/tmp/dbginfo")
!2 = !{}
!3 = !{!4}
-!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !5, scope: !6, type: !7, function: i32 (i32)* @_Z4funci, variables: !2)
+!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4funci", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !5, scope: !6, type: !7, variables: !2)
!5 = !DIFile(filename: "func.h", directory: "/tmp/dbginfo")
!6 = !DIFile(filename: "func.h", directory: "/tmp/dbginfo")
!7 = !DISubroutineType(types: !8)
diff --git a/llvm/test/DebugInfo/Generic/cu-range-hole.ll b/llvm/test/DebugInfo/Generic/cu-range-hole.ll
index 96b5380d97c..12651a844ef 100644
--- a/llvm/test/DebugInfo/Generic/cu-range-hole.ll
+++ b/llvm/test/DebugInfo/Generic/cu-range-hole.ll
@@ -14,7 +14,7 @@
; CHECK: DW_TAG_subprogram
; Function Attrs: nounwind uwtable
-define i32 @b(i32 %c) #0 {
+define i32 @b(i32 %c) #0 !dbg !5 {
entry:
%c.addr = alloca i32, align 4
store i32 %c, i32* %c.addr, align 4
@@ -38,7 +38,7 @@ entry:
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
; Function Attrs: nounwind uwtable
-define i32 @d(i32 %e) #0 {
+define i32 @d(i32 %e) #0 !dbg !10 {
entry:
%e.addr = alloca i32, align 4
store i32 %e, i32* %e.addr, align 4
@@ -60,12 +60,12 @@ attributes #1 = { nounwind readnone }
!2 = !DIFile(filename: "b.c", directory: "/usr/local/google/home/echristo")
!3 = !{}
!4 = !{!5, !10}
-!5 = distinct !DISubprogram(name: "b", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !2, scope: !6, type: !7, function: i32 (i32)* @b, variables: !3)
+!5 = distinct !DISubprogram(name: "b", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !2, scope: !6, type: !7, variables: !3)
!6 = !DIFile(filename: "b.c", directory: "/usr/local/google/home/echristo")
!7 = !DISubroutineType(types: !8)
!8 = !{!9, !9}
!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!10 = distinct !DISubprogram(name: "d", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !2, scope: !6, type: !7, function: i32 (i32)* @d, variables: !3)
+!10 = distinct !DISubprogram(name: "d", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !2, scope: !6, type: !7, variables: !3)
!11 = !{i32 2, !"Dwarf Version", i32 4}
!12 = !{i32 1, !"Debug Info Version", i32 3}
!13 = !DILocalVariable(name: "c", line: 1, arg: 1, scope: !5, file: !6, type: !9)
diff --git a/llvm/test/DebugInfo/Generic/cu-ranges.ll b/llvm/test/DebugInfo/Generic/cu-ranges.ll
index 03ddb2708bc..ab5577984e6 100644
--- a/llvm/test/DebugInfo/Generic/cu-ranges.ll
+++ b/llvm/test/DebugInfo/Generic/cu-ranges.ll
@@ -18,7 +18,7 @@
; CHECK: 00000000 <End of list>
; Function Attrs: nounwind uwtable
-define i32 @foo(i32 %a) #0 section "__TEXT,__foo" {
+define i32 @foo(i32 %a) #0 section "__TEXT,__foo" !dbg !4 {
entry:
%a.addr = alloca i32, align 4
store i32 %a, i32* %a.addr, align 4
@@ -32,7 +32,7 @@ entry:
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
; Function Attrs: nounwind uwtable
-define i32 @bar(i32 %a) #0 {
+define i32 @bar(i32 %a) #0 !dbg !9 {
entry:
%a.addr = alloca i32, align 4
store i32 %a, i32* %a.addr, align 4
@@ -53,12 +53,12 @@ attributes #1 = { nounwind readnone }
!1 = !DIFile(filename: "foo.c", directory: "/usr/local/google/home/echristo")
!2 = !{}
!3 = !{!4, !9}
-!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, function: i32 (i32)* @foo, variables: !2)
+!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2)
!5 = !DIFile(filename: "foo.c", directory: "/usr/local/google/home/echristo")
!6 = !DISubroutineType(types: !7)
!7 = !{!8, !8}
!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!9 = distinct !DISubprogram(name: "bar", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !5, type: !6, function: i32 (i32)* @bar, variables: !2)
+!9 = distinct !DISubprogram(name: "bar", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !5, type: !6, variables: !2)
!10 = !{i32 2, !"Dwarf Version", i32 4}
!11 = !{i32 1, !"Debug Info Version", i32 3}
!12 = !{!"clang version 3.5.0 (trunk 204164) (llvm/trunk 204183)"}
diff --git a/llvm/test/DebugInfo/Generic/dead-argument-order.ll b/llvm/test/DebugInfo/Generic/dead-argument-order.ll
index b3ae5fe5e31..a6451a038cd 100644
--- a/llvm/test/DebugInfo/Generic/dead-argument-order.ll
+++ b/llvm/test/DebugInfo/Generic/dead-argument-order.ll
@@ -36,7 +36,7 @@
%struct.S = type { i32 }
; Function Attrs: nounwind readnone uwtable
-define i32 @_Z8function1Si(i32 %s.coerce, i32 %i) #0 {
+define i32 @_Z8function1Si(i32 %s.coerce, i32 %i) #0 !dbg !9 {
entry:
tail call void @llvm.dbg.declare(metadata %struct.S* undef, metadata !14, metadata !DIExpression()), !dbg !20
tail call void @llvm.dbg.value(metadata i32 %i, i64 0, metadata !15, metadata !DIExpression()), !dbg !20
@@ -66,7 +66,7 @@ attributes #1 = { nounwind readnone }
!6 = !DIDerivedType(tag: DW_TAG_member, name: "i", line: 1, size: 32, align: 32, file: !1, scope: !"_ZTS1S", baseType: !7)
!7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!8 = !{!9}
-!9 = distinct !DISubprogram(name: "function", linkageName: "_Z8function1Si", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !1, scope: !10, type: !11, function: i32 (i32, i32)* @_Z8function1Si, variables: !13)
+!9 = distinct !DISubprogram(name: "function", linkageName: "_Z8function1Si", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !1, scope: !10, type: !11, variables: !13)
!10 = !DIFile(filename: "dead-argument-order.cpp", directory: "/tmp/dbginfo")
!11 = !DISubroutineType(types: !12)
!12 = !{!7, !4, !7}
diff --git a/llvm/test/DebugInfo/Generic/debug-info-qualifiers.ll b/llvm/test/DebugInfo/Generic/debug-info-qualifiers.ll
index c13a5ea731b..aa197dd9f6f 100644
--- a/llvm/test/DebugInfo/Generic/debug-info-qualifiers.ll
+++ b/llvm/test/DebugInfo/Generic/debug-info-qualifiers.ll
@@ -35,7 +35,7 @@
%class.A = type { i8 }
; Function Attrs: nounwind
-define void @_Z1gv() #0 {
+define void @_Z1gv() #0 !dbg !17 {
%a = alloca %class.A, align 1
%pl = alloca { i64, i64 }, align 8
%pr = alloca { i64, i64 }, align 8
@@ -76,7 +76,7 @@ attributes #1 = { nounwind readnone }
!13 = !DISubprogram(name: "r", linkageName: "_ZNKO1A1rEv", line: 7, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagObjectPointer | DIFlagRValueReference, isOptimized: false, scopeLine: 7, file: !5, scope: !"_ZTS1A", type: !14)
!14 = !DISubroutineType(flags: DIFlagRValueReference, types: !9)
!16 = !{!17}
-!17 = distinct !DISubprogram(name: "g", linkageName: "_Z1gv", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 10, file: !5, scope: !18, type: !19, function: void ()* @_Z1gv, variables: !2)
+!17 = distinct !DISubprogram(name: "g", linkageName: "_Z1gv", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 10, file: !5, scope: !18, type: !19, variables: !2)
!18 = !DIFile(filename: "debug-info-qualifiers.cpp", directory: "")
!19 = !DISubroutineType(types: !20)
!20 = !{null}
diff --git a/llvm/test/DebugInfo/Generic/debuginfofinder-multiple-cu.ll b/llvm/test/DebugInfo/Generic/debuginfofinder-multiple-cu.ll
index 06ed02a4ce0..a4d226b86a6 100644
--- a/llvm/test/DebugInfo/Generic/debuginfofinder-multiple-cu.ll
+++ b/llvm/test/DebugInfo/Generic/debuginfofinder-multiple-cu.ll
@@ -11,11 +11,11 @@
;CHECK: Subprogram: f from /tmp/test1.c:1
;CHECK: Subprogram: g from /tmp/test2.c:1
-define void @f() {
+define void @f() !dbg !4 {
ret void, !dbg !14
}
-define void @g() {
+define void @g() !dbg !11 {
ret void, !dbg !15
}
@@ -26,14 +26,14 @@ define void @g() {
!1 = !DIFile(filename: "test1.c", directory: "/tmp")
!2 = !{}
!3 = !{!4}
-!4 = distinct !DISubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, function: void ()* @f, variables: !2)
+!4 = distinct !DISubprogram(name: "f", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2)
!5 = !DIFile(filename: "test1.c", directory: "/tmp")
!6 = !DISubroutineType(types: !7)
!7 = !{null}
!8 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 (192092)", isOptimized: false, emissionKind: 0, file: !9, enums: !2, retainedTypes: !2, subprograms: !10, globals: !2, imports: !2)
!9 = !DIFile(filename: "test2.c", directory: "/tmp")
!10 = !{!11}
-!11 = distinct !DISubprogram(name: "g", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 1, file: !9, scope: !12, type: !6, function: void ()* @g, variables: !2)
+!11 = distinct !DISubprogram(name: "g", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 1, file: !9, scope: !12, type: !6, variables: !2)
!12 = !DIFile(filename: "test2.c", directory: "/tmp")
!13 = !{i32 2, !"Dwarf Version", i32 4}
!14 = !DILocation(line: 1, scope: !4)
diff --git a/llvm/test/DebugInfo/Generic/def-line.ll b/llvm/test/DebugInfo/Generic/def-line.ll
index aa9830170b9..da9867952f1 100644
--- a/llvm/test/DebugInfo/Generic/def-line.ll
+++ b/llvm/test/DebugInfo/Generic/def-line.ll
@@ -43,20 +43,20 @@
; CHECK: DW_AT_specification {{.*}}f3
; Function Attrs: uwtable
-define void @_ZN3foo2f2Ev() #0 align 2 {
+define void @_ZN3foo2f2Ev() #0 align 2 !dbg !12 {
entry:
call void @_ZN3foo2f1Ev(), !dbg !19
ret void, !dbg !20
}
; Function Attrs: nounwind uwtable
-define linkonce_odr void @_ZN3foo2f1Ev() #1 align 2 {
+define linkonce_odr void @_ZN3foo2f1Ev() #1 align 2 !dbg !15 {
entry:
ret void, !dbg !21
}
; Function Attrs: nounwind uwtable
-define void @_ZN3foo2f3Ev() #1 align 2 {
+define void @_ZN3foo2f3Ev() #1 align 2 !dbg !13 {
entry:
ret void, !dbg !22
}
@@ -80,10 +80,10 @@ attributes #1 = { nounwind uwtable "disable-tail-calls"="false" "less-precise-fp
!9 = !DISubprogram(name: "f2", linkageName: "_ZN3foo2f2Ev", scope: !"_ZTS3foo", file: !1, line: 4, type: !7, isLocal: false, isDefinition: false, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: false)
!10 = !DISubprogram(name: "f3", linkageName: "_ZN3foo2f3Ev", scope: !"_ZTS3foo", file: !1, line: 5, type: !7, isLocal: false, isDefinition: false, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: false)
!11 = !{!12, !13, !15}
-!12 = distinct !DISubprogram(name: "f2", linkageName: "_ZN3foo2f2Ev", scope: !"_ZTS3foo", file: !1, line: 7, type: !7, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, function: void ()* @_ZN3foo2f2Ev, declaration: !9, variables: !2)
-!13 = distinct !DISubprogram(name: "f3", linkageName: "_ZN3foo2f3Ev", scope: !"_ZTS3foo", file: !14, line: 1, type: !7, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, function: void ()* @_ZN3foo2f3Ev, declaration: !10, variables: !2)
+!12 = distinct !DISubprogram(name: "f2", linkageName: "_ZN3foo2f2Ev", scope: !"_ZTS3foo", file: !1, line: 7, type: !7, isLocal: false, isDefinition: true, scopeLine: 7, flags: DIFlagPrototyped, isOptimized: false, declaration: !9, variables: !2)
+!13 = distinct !DISubprogram(name: "f3", linkageName: "_ZN3foo2f3Ev", scope: !"_ZTS3foo", file: !14, line: 1, type: !7, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, declaration: !10, variables: !2)
!14 = !DIFile(filename: "bar.cpp", directory: "/tmp/dbginfo")
-!15 = distinct !DISubprogram(name: "f1", linkageName: "_ZN3foo2f1Ev", scope: !"_ZTS3foo", file: !1, line: 2, type: !7, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, function: void ()* @_ZN3foo2f1Ev, declaration: !6, variables: !2)
+!15 = distinct !DISubprogram(name: "f1", linkageName: "_ZN3foo2f1Ev", scope: !"_ZTS3foo", file: !1, line: 2, type: !7, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false, declaration: !6, variables: !2)
!16 = !{i32 2, !"Dwarf Version", i32 4}
!17 = !{i32 2, !"Debug Info Version", i32 3}
!18 = !{!"clang version 3.8.0 (trunk 249440) (llvm/trunk 249465)"}
diff --git a/llvm/test/DebugInfo/Generic/dwarf-public-names.ll b/llvm/test/DebugInfo/Generic/dwarf-public-names.ll
index c14412d3d81..b98a8e7415c 100644
--- a/llvm/test/DebugInfo/Generic/dwarf-public-names.ll
+++ b/llvm/test/DebugInfo/Generic/dwarf-public-names.ll
@@ -55,7 +55,7 @@
@global_variable = global %struct.C zeroinitializer, align 1
@_ZN2ns25global_namespace_variableE = global i32 1, align 4
-define void @_ZN1C15member_functionEv(%struct.C* %this) nounwind uwtable align 2 {
+define void @_ZN1C15member_functionEv(%struct.C* %this) nounwind uwtable align 2 !dbg !3 {
entry:
%this.addr = alloca %struct.C*, align 8
store %struct.C* %this, %struct.C** %this.addr, align 8
@@ -67,18 +67,18 @@ entry:
declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
-define i32 @_ZN1C22static_member_functionEv() nounwind uwtable align 2 {
+define i32 @_ZN1C22static_member_functionEv() nounwind uwtable align 2 !dbg !18 {
entry:
%0 = load i32, i32* @_ZN1C22static_member_variableE, align 4, !dbg !33
ret i32 %0, !dbg !33
}
-define i32 @_Z15global_functionv() nounwind uwtable {
+define i32 @_Z15global_functionv() nounwind uwtable !dbg !19 {
entry:
ret i32 -1, !dbg !34
}
-define void @_ZN2ns25global_namespace_functionEv() nounwind uwtable {
+define void @_ZN2ns25global_namespace_functionEv() nounwind uwtable !dbg !20 {
entry:
call void @_ZN1C15member_functionEv(%struct.C* @global_variable), !dbg !35
ret void, !dbg !36
@@ -93,7 +93,7 @@ attributes #1 = { nounwind readnone }
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (http://llvm.org/git/clang.git a09cd8103a6a719cb2628cdf0c91682250a17bd2) (http://llvm.org/git/llvm.git 47d03cec0afca0c01ae42b82916d1d731716cd20)", isOptimized: false, emissionKind: 0, file: !37, enums: !1, retainedTypes: !1, subprograms: !2, globals: !24, imports: !1)
!1 = !{}
!2 = !{!3, !18, !19, !20}
-!3 = distinct !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 9, file: !4, scope: null, type: !5, function: void (%struct.C*)* @_ZN1C15member_functionEv, declaration: !12, variables: !1)
+!3 = distinct !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 9, file: !4, scope: null, type: !5, declaration: !12, variables: !1)
!4 = !DIFile(filename: "dwarf-public-names.cpp", directory: "/usr2/kparzysz/s.hex/t")
!5 = !DISubroutineType(types: !6)
!6 = !{null, !7}
@@ -108,9 +108,9 @@ attributes #1 = { nounwind readnone }
!15 = !DISubroutineType(types: !16)
!16 = !{!11}
!17 = !{} ; previously: invalid DW_TAG_base_type
-!18 = distinct !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 13, file: !4, scope: null, type: !15, function: i32 ()* @_ZN1C22static_member_functionEv, declaration: !14, variables: !1)
-!19 = distinct !DISubprogram(name: "global_function", linkageName: "_Z15global_functionv", line: 19, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 19, file: !4, scope: !4, type: !15, function: i32 ()* @_Z15global_functionv, variables: !1)
-!20 = distinct !DISubprogram(name: "global_namespace_function", linkageName: "_ZN2ns25global_namespace_functionEv", line: 24, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 24, file: !4, scope: !21, type: !22, function: void ()* @_ZN2ns25global_namespace_functionEv, variables: !1)
+!18 = distinct !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 13, file: !4, scope: null, type: !15, declaration: !14, variables: !1)
+!19 = distinct !DISubprogram(name: "global_function", linkageName: "_Z15global_functionv", line: 19, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 19, file: !4, scope: !4, type: !15, variables: !1)
+!20 = distinct !DISubprogram(name: "global_namespace_function", linkageName: "_ZN2ns25global_namespace_functionEv", line: 24, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 24, file: !4, scope: !21, type: !22, variables: !1)
!21 = !DINamespace(name: "ns", line: 23, file: !4, scope: null)
!22 = !DISubroutineType(types: !23)
!23 = !{null}
diff --git a/llvm/test/DebugInfo/Generic/enum-types.ll b/llvm/test/DebugInfo/Generic/enum-types.ll
index 484f965384e..e71fcbc52bf 100644
--- a/llvm/test/DebugInfo/Generic/enum-types.ll
+++ b/llvm/test/DebugInfo/Generic/enum-types.ll
@@ -21,7 +21,7 @@
; CHECK: DW_AT_type [DW_FORM_ref_addr] {{.*}}[[ENUM]]
; Function Attrs: nounwind ssp uwtable
-define void @_Z4topA2EA(i32 %sa) #0 {
+define void @_Z4topA2EA(i32 %sa) #0 !dbg !7 {
entry:
%sa.addr = alloca i32, align 4
store i32 %sa, i32* %sa.addr, align 4
@@ -33,7 +33,7 @@ entry:
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
; Function Attrs: nounwind ssp uwtable
-define void @_Z4topB2EA(i32 %sa) #0 {
+define void @_Z4topB2EA(i32 %sa) #0 !dbg !17 {
entry:
%sa.addr = alloca i32, align 4
store i32 %sa, i32* %sa.addr, align 4
@@ -55,7 +55,7 @@ attributes #1 = { nounwind readnone }
!4 = !{!5}
!5 = !DIEnumerator(name: "EA_0", value: 0) ; [ DW_TAG_enumerator ] [EA_0 :: 0]
!6 = !{!7}
-!7 = distinct !DISubprogram(name: "topA", linkageName: "_Z4topA2EA", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !8, type: !9, function: void (i32)* @_Z4topA2EA, variables: !11)
+!7 = distinct !DISubprogram(name: "topA", linkageName: "_Z4topA2EA", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !8, type: !9, variables: !11)
!8 = !DIFile(filename: "a.cpp", directory: "")
!9 = !DISubroutineType(types: !10)
!10 = !{null, !"_ZTS2EA"}
@@ -65,7 +65,7 @@ attributes #1 = { nounwind readnone }
!14 = !{!15}
!15 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "EA", line: 1, size: 32, align: 32, file: !13, elements: !4, identifier: "_ZTS2EA")
!16 = !{!17}
-!17 = distinct !DISubprogram(name: "topB", linkageName: "_Z4topB2EA", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !13, scope: !18, type: !9, function: void (i32)* @_Z4topB2EA, variables: !11)
+!17 = distinct !DISubprogram(name: "topB", linkageName: "_Z4topB2EA", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !13, scope: !18, type: !9, variables: !11)
!18 = !DIFile(filename: "b.cpp", directory: "")
!19 = !{i32 2, !"Dwarf Version", i32 2}
!20 = !{i32 2, !"Debug Info Version", i32 3}
diff --git a/llvm/test/DebugInfo/Generic/enum.ll b/llvm/test/DebugInfo/Generic/enum.ll
index 8d91c4e3943..6d1bddc2f72 100644
--- a/llvm/test/DebugInfo/Generic/enum.ll
+++ b/llvm/test/DebugInfo/Generic/enum.ll
@@ -36,7 +36,7 @@
@a = global i64 0, align 8
; Function Attrs: nounwind uwtable
-define void @_Z4funcv() #0 {
+define void @_Z4funcv() #0 !dbg !13 {
entry:
%b = alloca i32, align 4
call void @llvm.dbg.declare(metadata i32* %b, metadata !20, metadata !DIExpression()), !dbg !22
@@ -66,7 +66,7 @@ attributes #1 = { nounwind readnone }
!10 = !DIEnumerator(name: "X", value: 0) ; [ DW_TAG_enumerator ] [X :: 0]
!11 = !{}
!12 = !{!13}
-!13 = distinct !DISubprogram(name: "func", linkageName: "_Z4funcv", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !14, type: !15, function: void ()* @_Z4funcv, variables: !11)
+!13 = distinct !DISubprogram(name: "func", linkageName: "_Z4funcv", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !14, type: !15, variables: !11)
!14 = !DIFile(filename: "enum.cpp", directory: "/tmp")
!15 = !DISubroutineType(types: !16)
!16 = !{null}
diff --git a/llvm/test/DebugInfo/Generic/global.ll b/llvm/test/DebugInfo/Generic/global.ll
index ed8091a6832..6cac9a2de05 100644
--- a/llvm/test/DebugInfo/Generic/global.ll
+++ b/llvm/test/DebugInfo/Generic/global.ll
@@ -16,7 +16,7 @@
; CHECK: DW_TAG_variable
; Function Attrs: nounwind readnone uwtable
-define i32 @main() #0 {
+define i32 @main() #0 !dbg !4 {
entry:
ret i32 0, !dbg !12
}
@@ -30,7 +30,7 @@ attributes #0 = { nounwind readnone uwtable "less-precise-fpmad"="false" "no-fra
!1 = !DIFile(filename: "global.cpp", directory: "/tmp")
!2 = !{}
!3 = !{!4}
-!4 = distinct !DISubprogram(name: "main", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !1, scope: !5, type: !6, function: i32 ()* @main, variables: !2)
+!4 = distinct !DISubprogram(name: "main", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2)
!5 = !DIFile(filename: "global.cpp", directory: "/tmp")
!6 = !DISubroutineType(types: !7)
!7 = !{!8}
diff --git a/llvm/test/DebugInfo/Generic/gvn.ll b/llvm/test/DebugInfo/Generic/gvn.ll
index 1b32918dd34..f9fb7ab5520 100644
--- a/llvm/test/DebugInfo/Generic/gvn.ll
+++ b/llvm/test/DebugInfo/Generic/gvn.ll
@@ -20,7 +20,7 @@ target triple = "arm64-apple-ios"
@b = common global i32 0, align 4
; Function Attrs: nounwind
-define void @f3() #0 {
+define void @f3() #0 !dbg !12 {
entry:
; Verify that the call still has a debug location after GVN.
; CHECK: %call = tail call i32 @f2(i32 1) #{{[0-9]}}, !dbg
@@ -78,7 +78,7 @@ attributes #3 = { nounwind }
!9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!10 = !{!11}
!11 = !DILocalVariable(name: "p1", arg: 1, scope: !4, file: !1, line: 2, type: !8)
-!12 = distinct !DISubprogram(name: "f3", scope: !1, file: !1, line: 9, type: !13, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: true, function: void ()* @f3, variables: !2)
+!12 = distinct !DISubprogram(name: "f3", scope: !1, file: !1, line: 9, type: !13, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: true, variables: !2)
!13 = !DISubroutineType(types: !14)
!14 = !{null}
!15 = !{!16, !17}
diff --git a/llvm/test/DebugInfo/Generic/incorrect-variable-debugloc.ll b/llvm/test/DebugInfo/Generic/incorrect-variable-debugloc.ll
index b5787923d1c..cf713ee3b97 100644
--- a/llvm/test/DebugInfo/Generic/incorrect-variable-debugloc.ll
+++ b/llvm/test/DebugInfo/Generic/incorrect-variable-debugloc.ll
@@ -58,7 +58,7 @@
@__asan_gen_1 = private unnamed_addr constant [13 x i8] c"1 32 1 3 tmp\00", align 1
; Function Attrs: noreturn sanitize_address
-define i32 @_Z3fn1v() #0 {
+define i32 @_Z3fn1v() #0 !dbg !22 {
entry:
%MyAlloca = alloca [64 x i8], align 32, !dbg !39
%0 = ptrtoint [64 x i8]* %MyAlloca to i64, !dbg !39
@@ -116,7 +116,7 @@ entry:
}
; Function Attrs: sanitize_address
-define void @_ZN1C5m_fn3Ev(%struct.C* nocapture %this) #1 align 2 {
+define void @_ZN1C5m_fn3Ev(%struct.C* nocapture %this) #1 align 2 !dbg !28 {
entry:
%MyAlloca = alloca [64 x i8], align 32, !dbg !48
%0 = ptrtoint [64 x i8]* %MyAlloca to i64, !dbg !48
@@ -358,13 +358,13 @@ attributes #3 = { nounwind readnone }
!19 = !{null, !20}
!20 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1B")
!21 = !{!22, !28, !32}
-!22 = distinct !DISubprogram(name: "fn1", linkageName: "_Z3fn1v", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 16, file: !5, scope: !23, type: !24, function: i32 ()* @_Z3fn1v, variables: !26)
+!22 = distinct !DISubprogram(name: "fn1", linkageName: "_Z3fn1v", line: 16, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 16, file: !5, scope: !23, type: !24, variables: !26)
!23 = !DIFile(filename: "incorrect-variable-debug-loc.cpp", directory: "/tmp/dbginfo")
!24 = !DISubroutineType(types: !25)
!25 = !{!8}
!26 = !{!27}
!27 = !DILocalVariable(name: "A", line: 17, scope: !22, file: !23, type: !"_ZTS1C")
-!28 = distinct !DISubprogram(name: "m_fn3", linkageName: "_ZN1C5m_fn3Ev", line: 21, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 21, file: !5, scope: !"_ZTS1C", type: !11, function: void (%struct.C*)* @_ZN1C5m_fn3Ev, declaration: !10, variables: !29)
+!28 = distinct !DISubprogram(name: "m_fn3", linkageName: "_ZN1C5m_fn3Ev", line: 21, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 21, file: !5, scope: !"_ZTS1C", type: !11, declaration: !10, variables: !29)
!29 = !{!30}
!30 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !31)
!31 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1C")
diff --git a/llvm/test/DebugInfo/Generic/incorrect-variable-debugloc1.ll b/llvm/test/DebugInfo/Generic/incorrect-variable-debugloc1.ll
index 7d40e404ce1..33af0baeb65 100644
--- a/llvm/test/DebugInfo/Generic/incorrect-variable-debugloc1.ll
+++ b/llvm/test/DebugInfo/Generic/incorrect-variable-debugloc1.ll
@@ -27,7 +27,7 @@
; DWARF4: Location description: 10 0d 9f
; Function Attrs: uwtable
-define i32 @main() #0 {
+define i32 @main() #0 !dbg !4 {
entry:
%c = alloca i32, align 4
tail call void @llvm.dbg.value(metadata i32 13, i64 0, metadata !10, metadata !16), !dbg !17
@@ -57,7 +57,7 @@ attributes #2 = { nounwind readnone }
!1 = !DIFile(filename: "test.cpp", directory: "/home/kromanova/ngh/ToT_latest/llvm/test/DebugInfo")
!2 = !{}
!3 = !{!4}
-!4 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 4, file: !1, scope: !5, type: !6, function: i32 ()* @main, variables: !9)
+!4 = distinct !DISubprogram(name: "main", line: 3, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !9)
!5 = !DIFile(filename: "test.cpp", directory: "/home/kromanova/ngh/ToT_latest/llvm/test/DebugInfo")
!6 = !DISubroutineType(types: !7)
!7 = !{!8}
diff --git a/llvm/test/DebugInfo/Generic/inline-debug-info-multiret.ll b/llvm/test/DebugInfo/Generic/inline-debug-info-multiret.ll
index e1ed553022c..5be261ac374 100644
--- a/llvm/test/DebugInfo/Generic/inline-debug-info-multiret.ll
+++ b/llvm/test/DebugInfo/Generic/inline-debug-info-multiret.ll
@@ -21,7 +21,7 @@ target triple = "x86_64-apple-darwin12.0.0"
@global_var = external global i32
; copy of above function with multiple returns
-define i32 @_Z4testi(i32 %k) {
+define i32 @_Z4testi(i32 %k) !dbg !4 {
entry:
%retval = alloca i32, align 4
%k.addr = alloca i32, align 4
@@ -57,7 +57,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
declare i32 @_Z8test_exti(i32)
-define i32 @_Z5test2v() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
+define i32 @_Z5test2v() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !dbg !10 {
entry:
%exn.slot = alloca i8*
%ehselector.slot = alloca i32
@@ -126,13 +126,13 @@ attributes #2 = { nounwind }
!1 = !DIFile(filename: "<unknown>", directory: "")
!2 = !{}
!3 = !{!4, !10}
-!4 = distinct !DISubprogram(name: "test", linkageName: "_Z4testi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !5, scope: !6, type: !7, function: i32 (i32)* @_Z4testi, variables: !2)
+!4 = distinct !DISubprogram(name: "test", linkageName: "_Z4testi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !5, scope: !6, type: !7, variables: !2)
!5 = !DIFile(filename: "test.cpp", directory: "")
!6 = !DIFile(filename: "test.cpp", directory: "")
!7 = !DISubroutineType(types: !8)
!8 = !{!9, !9}
!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!10 = distinct !DISubprogram(name: "test2", linkageName: "_Z5test2v", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 11, file: !5, scope: !6, type: !11, function: i32 ()* @_Z5test2v, variables: !2)
+!10 = distinct !DISubprogram(name: "test2", linkageName: "_Z5test2v", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 11, file: !5, scope: !6, type: !11, variables: !2)
!11 = !DISubroutineType(types: !12)
!12 = !{!9}
!13 = !DILocalVariable(name: "k", line: 4, arg: 1, scope: !4, file: !6, type: !9)
diff --git a/llvm/test/DebugInfo/Generic/inline-debug-info.ll b/llvm/test/DebugInfo/Generic/inline-debug-info.ll
index baadc39a9f7..a5d55a4f98a 100644
--- a/llvm/test/DebugInfo/Generic/inline-debug-info.ll
+++ b/llvm/test/DebugInfo/Generic/inline-debug-info.ll
@@ -41,7 +41,7 @@ target triple = "x86_64-apple-darwin12.0.0"
@_ZTIi = external constant i8*
@global_var = external global i32
-define i32 @_Z4testi(i32 %k) {
+define i32 @_Z4testi(i32 %k) !dbg !4 {
entry:
%retval = alloca i32, align 4
%k.addr = alloca i32, align 4
@@ -75,7 +75,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
declare i32 @_Z8test_exti(i32)
-define i32 @_Z5test2v() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
+define i32 @_Z5test2v() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) !dbg !10 {
entry:
%exn.slot = alloca i8*
%ehselector.slot = alloca i32
@@ -144,13 +144,13 @@ attributes #2 = { nounwind }
!1 = !DIFile(filename: "<unknown>", directory: "")
!2 = !{}
!3 = !{!4, !10}
-!4 = distinct !DISubprogram(name: "test", linkageName: "_Z4testi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !5, scope: !6, type: !7, function: i32 (i32)* @_Z4testi, variables: !2)
+!4 = distinct !DISubprogram(name: "test", linkageName: "_Z4testi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !5, scope: !6, type: !7, variables: !2)
!5 = !DIFile(filename: "test.cpp", directory: "")
!6 = !DIFile(filename: "test.cpp", directory: "")
!7 = !DISubroutineType(types: !8)
!8 = !{!9, !9}
!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!10 = distinct !DISubprogram(name: "test2", linkageName: "_Z5test2v", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 11, file: !5, scope: !6, type: !11, function: i32 ()* @_Z5test2v, variables: !2)
+!10 = distinct !DISubprogram(name: "test2", linkageName: "_Z5test2v", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 11, file: !5, scope: !6, type: !11, variables: !2)
!11 = !DISubroutineType(types: !12)
!12 = !{!9}
!13 = !DILocalVariable(name: "k", line: 4, arg: 1, scope: !4, file: !6, type: !9)
diff --git a/llvm/test/DebugInfo/Generic/inline-no-debug-info.ll b/llvm/test/DebugInfo/Generic/inline-no-debug-info.ll
index a46146761a2..443ba9da6b5 100644
--- a/llvm/test/DebugInfo/Generic/inline-no-debug-info.ll
+++ b/llvm/test/DebugInfo/Generic/inline-no-debug-info.ll
@@ -43,7 +43,7 @@ entry:
}
; Function Attrs: nounwind uwtable
-define void @caller() #0 {
+define void @caller() #0 !dbg !4 {
entry:
tail call void @callee(), !dbg !12
ret void, !dbg !12
@@ -59,7 +59,7 @@ attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointe
!1 = !DIFile(filename: "test.c", directory: "/code/llvm/build0")
!2 = !{}
!3 = !{!4, !7}
-!4 = distinct !DISubprogram(name: "caller", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 4, file: !1, scope: !5, type: !6, function: void ()* @caller, variables: !2)
+!4 = distinct !DISubprogram(name: "caller", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !2)
!5 = !DIFile(filename: "test.c", directory: "/code/llvm/build0")
!6 = !DISubroutineType(types: !2)
!7 = distinct !DISubprogram(name: "callee2", line: 2, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2)
diff --git a/llvm/test/DebugInfo/Generic/inline-scopes.ll b/llvm/test/DebugInfo/Generic/inline-scopes.ll
index 266d03e93e0..432c58b79e1 100644
--- a/llvm/test/DebugInfo/Generic/inline-scopes.ll
+++ b/llvm/test/DebugInfo/Generic/inline-scopes.ll
@@ -37,7 +37,7 @@
; CHECK: DW_AT_abstract_origin
; Function Attrs: uwtable
-define i32 @main() #0 {
+define i32 @main() #0 !dbg !4 {
entry:
%retval.i2 = alloca i32, align 4
%b.i3 = alloca i8, align 1
@@ -99,7 +99,7 @@ attributes #2 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "n
!1 = !DIFile(filename: "inline-scopes.cpp", directory: "/tmp/dbginfo")
!2 = !{}
!3 = !{!4, !10, !12}
-!4 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !5, scope: !6, type: !7, function: i32 ()* @main, variables: !2)
+!4 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 7, file: !5, scope: !6, type: !7, variables: !2)
!5 = !DIFile(filename: "y.cc", directory: "/tmp/dbginfo")
!6 = !DIFile(filename: "y.cc", directory: "/tmp/dbginfo")
!7 = !DISubroutineType(types: !8)
diff --git a/llvm/test/DebugInfo/Generic/inlined-arguments.ll b/llvm/test/DebugInfo/Generic/inlined-arguments.ll
index 69825faa8b9..af4820845a0 100644
--- a/llvm/test/DebugInfo/Generic/inlined-arguments.ll
+++ b/llvm/test/DebugInfo/Generic/inlined-arguments.ll
@@ -23,7 +23,7 @@
; CHECK: DW_AT_name{{.*}}"y"
; Function Attrs: uwtable
-define void @_Z2f2v() #0 {
+define void @_Z2f2v() #0 !dbg !4 {
tail call void @llvm.dbg.value(metadata i32 undef, i64 0, metadata !16, metadata !DIExpression()), !dbg !18
tail call void @llvm.dbg.value(metadata i32 2, i64 0, metadata !20, metadata !DIExpression()), !dbg !18
tail call void @_Z2f3i(i32 2), !dbg !21
@@ -31,7 +31,7 @@ define void @_Z2f2v() #0 {
}
; Function Attrs: uwtable
-define void @_Z2f1ii(i32 %x, i32 %y) #0 {
+define void @_Z2f1ii(i32 %x, i32 %y) #0 !dbg !8 {
tail call void @llvm.dbg.value(metadata i32 %x, i64 0, metadata !13, metadata !DIExpression()), !dbg !23
tail call void @llvm.dbg.value(metadata i32 %y, i64 0, metadata !14, metadata !DIExpression()), !dbg !23
tail call void @_Z2f3i(i32 %y), !dbg !24
@@ -54,11 +54,11 @@ attributes #2 = { nounwind readnone }
!1 = !DIFile(filename: "exp.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch")
!2 = !{}
!3 = !{!4, !8}
-!4 = distinct !DISubprogram(name: "f2", linkageName: "_Z2f2v", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !1, scope: !5, type: !6, function: void ()* @_Z2f2v, variables: !2)
+!4 = distinct !DISubprogram(name: "f2", linkageName: "_Z2f2v", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2)
!5 = !DIFile(filename: "exp.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch")
!6 = !DISubroutineType(types: !7)
!7 = !{null}
-!8 = distinct !DISubprogram(name: "f1", linkageName: "_Z2f1ii", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 6, file: !1, scope: !5, type: !9, function: void (i32, i32)* @_Z2f1ii, variables: !12)
+!8 = distinct !DISubprogram(name: "f1", linkageName: "_Z2f1ii", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 6, file: !1, scope: !5, type: !9, variables: !12)
!9 = !DISubroutineType(types: !10)
!10 = !{null, !11, !11}
!11 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
diff --git a/llvm/test/DebugInfo/Generic/inlined-vars.ll b/llvm/test/DebugInfo/Generic/inlined-vars.ll
index 05e7f7d2beb..a294380bb5c 100644
--- a/llvm/test/DebugInfo/Generic/inlined-vars.ll
+++ b/llvm/test/DebugInfo/Generic/inlined-vars.ll
@@ -2,7 +2,7 @@
; RUN: %llc_dwarf -O0 < %s | FileCheck %s -check-prefix VARIABLE
; PR 13202
-define i32 @main() uwtable {
+define i32 @main() uwtable !dbg !5 {
entry:
tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !18, metadata !DIExpression()), !dbg !21
tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !22, metadata !DIExpression()), !dbg !23
@@ -22,7 +22,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
!1 = !{i32 0}
!2 = !{}
!3 = !{!5, !10}
-!5 = distinct !DISubprogram(name: "main", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 10, file: !26, scope: !6, type: !7, function: i32 ()* @main, variables: !2)
+!5 = distinct !DISubprogram(name: "main", line: 10, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 10, file: !26, scope: !6, type: !7, variables: !2)
!6 = !DIFile(filename: "inline-bug.cc", directory: "/tmp/dbginfo/pr13202")
!7 = !DISubroutineType(types: !8)
!8 = !{!9}
diff --git a/llvm/test/DebugInfo/Generic/location-verifier.ll b/llvm/test/DebugInfo/Generic/location-verifier.ll
index a767ab903c3..aa725a2369a 100644
--- a/llvm/test/DebugInfo/Generic/location-verifier.ll
+++ b/llvm/test/DebugInfo/Generic/location-verifier.ll
@@ -4,7 +4,7 @@ target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.10.0"
; Function Attrs: nounwind ssp uwtable
-define i32 @foo() #0 {
+define i32 @foo() #0 !dbg !4 {
entry:
ret i32 42, !dbg !13
}
@@ -19,7 +19,7 @@ attributes #0 = { nounwind ssp uwtable }
!1 = !DIFile(filename: "test.c", directory: "")
!2 = !{}
!3 = !{!4}
-!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, function: i32 ()* @foo, variables: !2)
+!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2)
!5 = !DIFile(filename: "test.c", directory: "")
!6 = !DISubroutineType(types: !7)
!7 = !{!8}
diff --git a/llvm/test/DebugInfo/Generic/lto-comp-dir.ll b/llvm/test/DebugInfo/Generic/lto-comp-dir.ll
index f20383d5636..8d5da504a82 100644
--- a/llvm/test/DebugInfo/Generic/lto-comp-dir.ll
+++ b/llvm/test/DebugInfo/Generic/lto-comp-dir.ll
@@ -40,13 +40,13 @@
; }
; Function Attrs: nounwind uwtable
-define void @_Z4funcv() #0 {
+define void @_Z4funcv() #0 !dbg !4 {
entry:
ret void, !dbg !19
}
; Function Attrs: uwtable
-define i32 @main() #1 {
+define i32 @main() #1 !dbg !11 {
entry:
call void @_Z4funcv(), !dbg !20
ret i32 0, !dbg !21
@@ -63,14 +63,14 @@ attributes #1 = { uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="
!1 = !DIFile(filename: "a.cpp", directory: "/tmp/dbginfo/a")
!2 = !{}
!3 = !{!4}
-!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4funcv", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, function: void ()* @_Z4funcv, variables: !2)
+!4 = distinct !DISubprogram(name: "func", linkageName: "_Z4funcv", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2)
!5 = !DIFile(filename: "a.cpp", directory: "/tmp/dbginfo/a")
!6 = !DISubroutineType(types: !7)
!7 = !{null}
!8 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: 1, file: !9, enums: !2, retainedTypes: !2, subprograms: !10, globals: !2, imports: !2)
!9 = !DIFile(filename: "b.cpp", directory: "/tmp/dbginfo/b")
!10 = !{!11}
-!11 = distinct !DISubprogram(name: "main", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !9, scope: !12, type: !13, function: i32 ()* @main, variables: !2)
+!11 = distinct !DISubprogram(name: "main", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !9, scope: !12, type: !13, variables: !2)
!12 = !DIFile(filename: "b.cpp", directory: "/tmp/dbginfo/b")
!13 = !DISubroutineType(types: !14)
!14 = !{!15}
diff --git a/llvm/test/DebugInfo/Generic/member-order.ll b/llvm/test/DebugInfo/Generic/member-order.ll
index 4c1f6b6c0ba..55ada4f829b 100644
--- a/llvm/test/DebugInfo/Generic/member-order.ll
+++ b/llvm/test/DebugInfo/Generic/member-order.ll
@@ -25,7 +25,7 @@
%struct.foo = type { i8 }
; Function Attrs: nounwind uwtable
-define void @_ZN3foo2f1Ev(%struct.foo* %this) #0 align 2 {
+define void @_ZN3foo2f1Ev(%struct.foo* %this) #0 align 2 !dbg !14 {
entry:
%this.addr = alloca %struct.foo*, align 8
store %struct.foo* %this, %struct.foo** %this.addr, align 8
@@ -57,7 +57,7 @@ attributes #1 = { nounwind readnone }
!11 = !DISubprogram(name: "f2", linkageName: "_ZN3foo2f2Ev", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !4, type: !7)
!12 = !{i32 786468}
!13 = !{!14}
-!14 = distinct !DISubprogram(name: "f1", linkageName: "_ZN3foo2f1Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: null, type: !7, function: void (%struct.foo*)* @_ZN3foo2f1Ev, declaration: !6, variables: !2)
+!14 = distinct !DISubprogram(name: "f1", linkageName: "_ZN3foo2f1Ev", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: null, type: !7, declaration: !6, variables: !2)
!15 = !{i32 2, !"Dwarf Version", i32 4}
!16 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !14, type: !17)
!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS3foo")
diff --git a/llvm/test/DebugInfo/Generic/missing-abstract-variable.ll b/llvm/test/DebugInfo/Generic/missing-abstract-variable.ll
index 0ebb5a28edc..ee4f1666d2b 100644
--- a/llvm/test/DebugInfo/Generic/missing-abstract-variable.ll
+++ b/llvm/test/DebugInfo/Generic/missing-abstract-variable.ll
@@ -97,7 +97,7 @@
@t = external global i32
; Function Attrs: uwtable
-define void @_Z1bv() #0 {
+define void @_Z1bv() #0 !dbg !4 {
entry:
tail call void @llvm.dbg.value(metadata i1 false, i64 0, metadata !25, metadata !DIExpression()), !dbg !27
tail call void @_Z1fi(i32 0), !dbg !28
@@ -105,7 +105,7 @@ entry:
}
; Function Attrs: uwtable
-define void @_Z1ab(i1 zeroext %u) #0 {
+define void @_Z1ab(i1 zeroext %u) #0 !dbg !8 {
entry:
tail call void @llvm.dbg.value(metadata i1 %u, i64 0, metadata !13, metadata !DIExpression()), !dbg !30
tail call void @llvm.dbg.value(metadata i1 %u, i64 0, metadata !31, metadata !DIExpression()), !dbg !33
@@ -139,11 +139,11 @@ attributes #2 = { nounwind readnone }
!1 = !DIFile(filename: "missing-abstract-variables.cc", directory: "/tmp/dbginfo")
!2 = !{}
!3 = !{!4, !8, !14}
-!4 = distinct !DISubprogram(name: "b", linkageName: "_Z1bv", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 13, file: !1, scope: !5, type: !6, function: void ()* @_Z1bv, variables: !2)
+!4 = distinct !DISubprogram(name: "b", linkageName: "_Z1bv", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 13, file: !1, scope: !5, type: !6, variables: !2)
!5 = !DIFile(filename: "missing-abstract-variables.cc", directory: "/tmp/dbginfo")
!6 = !DISubroutineType(types: !7)
!7 = !{null}
-!8 = distinct !DISubprogram(name: "a", linkageName: "_Z1ab", line: 17, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 17, file: !1, scope: !5, type: !9, function: void (i1)* @_Z1ab, variables: !12)
+!8 = distinct !DISubprogram(name: "a", linkageName: "_Z1ab", line: 17, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 17, file: !1, scope: !5, type: !9, variables: !12)
!9 = !DISubroutineType(types: !10)
!10 = !{null, !11}
!11 = !DIBasicType(tag: DW_TAG_base_type, name: "bool", size: 8, align: 8, encoding: DW_ATE_boolean)
diff --git a/llvm/test/DebugInfo/Generic/multiline.ll b/llvm/test/DebugInfo/Generic/multiline.ll
index aaad0326477..7740bb6918a 100644
--- a/llvm/test/DebugInfo/Generic/multiline.ll
+++ b/llvm/test/DebugInfo/Generic/multiline.ll
@@ -42,7 +42,7 @@
; Function Attrs: nounwind uwtable
-define void @f2() #0 {
+define void @f2() #0 !dbg !4 {
entry:
call void (...) @f1(), !dbg !11
call void (...) @f1(), !dbg !12
@@ -66,7 +66,7 @@ attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "n
!1 = !DIFile(filename: "multiline.c", directory: "/tmp/dbginfo")
!2 = !{}
!3 = !{!4}
-!4 = distinct !DISubprogram(name: "f2", line: 2, isLocal: false, isDefinition: true, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, function: void ()* @f2, variables: !2)
+!4 = distinct !DISubprogram(name: "f2", line: 2, isLocal: false, isDefinition: true, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2)
!5 = !DIFile(filename: "multiline.c", directory: "/tmp/dbginfo")
!6 = !DISubroutineType(types: !7)
!7 = !{null}
diff --git a/llvm/test/DebugInfo/Generic/namespace.ll b/llvm/test/DebugInfo/Generic/namespace.ll
index 5554c9ff48e..e446806249f 100644
--- a/llvm/test/DebugInfo/Generic/namespace.ll
+++ b/llvm/test/DebugInfo/Generic/namespace.ll
@@ -205,13 +205,13 @@
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_debug_info_namespace.cpp, i8* null }]
; Function Attrs: nounwind ssp uwtable
-define i32 @_ZN1A1B2f1Ev() #0 {
+define i32 @_ZN1A1B2f1Ev() #0 !dbg !10 {
entry:
ret i32 0, !dbg !60
}
; Function Attrs: nounwind ssp uwtable
-define void @_ZN1A1B2f1Ei(i32) #0 {
+define void @_ZN1A1B2f1Ei(i32) #0 !dbg !14 {
entry:
%.addr = alloca i32, align 4
store i32 %0, i32* %.addr, align 4
@@ -222,7 +222,7 @@ entry:
; Function Attrs: nounwind readnone
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
-define internal void @__cxx_global_var_init() section "__TEXT,__StaticInit,regular,pure_instructions" {
+define internal void @__cxx_global_var_init() section "__TEXT,__StaticInit,regular,pure_instructions" !dbg !17 {
entry:
%call = call i32 @_ZN1A1B2f1Ev(), !dbg !65
store i32 %call, i32* @_ZN1A1B1iE, align 4, !dbg !65
@@ -230,7 +230,7 @@ entry:
}
; Function Attrs: nounwind ssp uwtable
-define i32 @_Z4funcb(i1 zeroext %b) #0 {
+define i32 @_Z4funcb(i1 zeroext %b) #0 !dbg !21 {
entry:
%retval = alloca i32, align 4
%b.addr = alloca i8, align 1
@@ -260,7 +260,7 @@ return: ; preds = %if.end, %if.then
ret i32 %5, !dbg !71
}
-define internal void @__cxx_global_var_init1() section "__TEXT,__StaticInit,regular,pure_instructions" {
+define internal void @__cxx_global_var_init1() section "__TEXT,__StaticInit,regular,pure_instructions" !dbg !25 {
entry:
%0 = load i32, i32* @_ZN1A1B1iE, align 4, !dbg !72
store i32 %0, i32* @_ZN1A1B7var_fwdE, align 4, !dbg !72
@@ -268,7 +268,7 @@ entry:
}
; Function Attrs: nounwind ssp uwtable
-define void @_ZN1A1B8func_fwdEv() #0 {
+define void @_ZN1A1B8func_fwdEv() #0 !dbg !26 {
entry:
ret void, !dbg !73
}
@@ -297,24 +297,24 @@ attributes #1 = { nounwind readnone }
!7 = !DINamespace(name: "A", line: 5, file: !1, scope: null)
!8 = !DICompositeType(tag: DW_TAG_structure_type, name: "bar", line: 6, size: 8, align: 8, file: !5, scope: !6, elements: !2, identifier: "_ZTSN1A1B3barE")
!9 = !{!10, !14, !17, !21, !25, !26, !27}
-!10 = distinct !DISubprogram(name: "f1", linkageName: "_ZN1A1B2f1Ev", line: 3, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !5, scope: !6, type: !11, function: i32 ()* @_ZN1A1B2f1Ev, variables: !2)
+!10 = distinct !DISubprogram(name: "f1", linkageName: "_ZN1A1B2f1Ev", line: 3, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !5, scope: !6, type: !11, variables: !2)
!11 = !DISubroutineType(types: !12)
!12 = !{!13}
!13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!14 = distinct !DISubprogram(name: "f1", linkageName: "_ZN1A1B2f1Ei", line: 4, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !5, scope: !6, type: !15, function: void (i32)* @_ZN1A1B2f1Ei, variables: !2)
+!14 = distinct !DISubprogram(name: "f1", linkageName: "_ZN1A1B2f1Ei", line: 4, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !5, scope: !6, type: !15, variables: !2)
!15 = !DISubroutineType(types: !16)
!16 = !{null, !13}
-!17 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 20, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 20, file: !5, scope: !18, type: !19, function: void ()* @__cxx_global_var_init, variables: !2)
+!17 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 20, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 20, file: !5, scope: !18, type: !19, variables: !2)
!18 = !DIFile(filename: "foo.cpp", directory: "/tmp")
!19 = !DISubroutineType(types: !20)
!20 = !{null}
-!21 = distinct !DISubprogram(name: "func", linkageName: "_Z4funcb", line: 21, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 21, file: !5, scope: !18, type: !22, function: i32 (i1)* @_Z4funcb, variables: !2)
+!21 = distinct !DISubprogram(name: "func", linkageName: "_Z4funcb", line: 21, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 21, file: !5, scope: !18, type: !22, variables: !2)
!22 = !DISubroutineType(types: !23)
!23 = !{!13, !24}
!24 = !DIBasicType(tag: DW_TAG_base_type, name: "bool", size: 8, align: 8, encoding: DW_ATE_boolean)
-!25 = distinct !DISubprogram(name: "__cxx_global_var_init1", line: 44, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 44, file: !5, scope: !18, type: !19, function: void ()* @__cxx_global_var_init1, variables: !2)
-!26 = distinct !DISubprogram(name: "func_fwd", linkageName: "_ZN1A1B8func_fwdEv", line: 47, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 47, file: !5, scope: !6, type: !19, function: void ()* @_ZN1A1B8func_fwdEv, variables: !2)
-!27 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__sub_I_debug_info_namespace.cpp", isLocal: true, isDefinition: true, flags: DIFlagArtificial, isOptimized: false, file: !1, scope: !28, type: !29, function: void ()* @_GLOBAL__sub_I_debug_info_namespace.cpp, variables: !2)
+!25 = distinct !DISubprogram(name: "__cxx_global_var_init1", line: 44, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 44, file: !5, scope: !18, type: !19, variables: !2)
+!26 = distinct !DISubprogram(name: "func_fwd", linkageName: "_ZN1A1B8func_fwdEv", line: 47, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 47, file: !5, scope: !6, type: !19, variables: !2)
+!27 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__sub_I_debug_info_namespace.cpp", isLocal: true, isDefinition: true, flags: DIFlagArtificial, isOptimized: false, file: !1, scope: !28, type: !29, variables: !2)
!28 = !DIFile(filename: "debug-info-namespace.cpp", directory: "/tmp")
!29 = !DISubroutineType(types: !2)
!30 = !{!31, !32}
diff --git a/llvm/test/DebugInfo/Generic/namespace_function_definition.ll b/llvm/test/DebugInfo/Generic/namespace_function_definition.ll
index f7a34c1827d..58a144fb118 100644
--- a/llvm/test/DebugInfo/Generic/namespace_function_definition.ll
+++ b/llvm/test/DebugInfo/Generic/namespace_function_definition.ll
@@ -19,7 +19,7 @@
; CHECK: NULL
; Function Attrs: nounwind uwtable
-define void @_ZN2ns4funcEv() #0 {
+define void @_ZN2ns4funcEv() #0 !dbg !4 {
entry:
ret void, !dbg !11
}
@@ -34,7 +34,7 @@ attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointe
!1 = !DIFile(filename: "namespace_function_definition.cpp", directory: "/tmp/dbginfo")
!2 = !{}
!3 = !{!4}
-!4 = distinct !DISubprogram(name: "func", linkageName: "_ZN2ns4funcEv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, function: void ()* @_ZN2ns4funcEv, variables: !2)
+!4 = distinct !DISubprogram(name: "func", linkageName: "_ZN2ns4funcEv", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !2)
!5 = !DINamespace(name: "ns", line: 1, file: !1, scope: null)
!6 = !DISubroutineType(types: !7)
!7 = !{null}
diff --git a/llvm/test/DebugInfo/Generic/namespace_inline_function_definition.ll b/llvm/test/DebugInfo/Generic/namespace_inline_function_definition.ll
index bc606198ce9..cca5e19db44 100644
--- a/llvm/test/DebugInfo/Generic/namespace_inline_function_definition.ll
+++ b/llvm/test/DebugInfo/Generic/namespace_inline_function_definition.ll
@@ -35,7 +35,7 @@
@x = external global i32
; Function Attrs: uwtable
-define i32 @main() #0 {
+define i32 @main() #0 !dbg !4 {
entry:
%i.addr.i = alloca i32, align 4
%retval = alloca i32, align 4
@@ -49,7 +49,7 @@ entry:
}
; Function Attrs: alwaysinline nounwind uwtable
-define i32 @_ZN2ns4funcEi(i32 %i) #1 {
+define i32 @_ZN2ns4funcEi(i32 %i) #1 !dbg !9 {
entry:
%i.addr = alloca i32, align 4
store i32 %i, i32* %i.addr, align 4
@@ -74,12 +74,12 @@ attributes #2 = { nounwind readnone }
!1 = !DIFile(filename: "namespace_inline_function_definition.cpp", directory: "/tmp/dbginfo")
!2 = !{}
!3 = !{!4, !9}
-!4 = distinct !DISubprogram(name: "main", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !5, type: !6, function: i32 ()* @main, variables: !2)
+!4 = distinct !DISubprogram(name: "main", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !5, type: !6, variables: !2)
!5 = !DIFile(filename: "namespace_inline_function_definition.cpp", directory: "/tmp/dbginfo")
!6 = !DISubroutineType(types: !7)
!7 = !{!8}
!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!9 = distinct !DISubprogram(name: "func", linkageName: "_ZN2ns4funcEi", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: !10, type: !11, function: i32 (i32)* @_ZN2ns4funcEi, variables: !2)
+!9 = distinct !DISubprogram(name: "func", linkageName: "_ZN2ns4funcEi", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: !10, type: !11, variables: !2)
!10 = !DINamespace(name: "ns", line: 1, file: !1, scope: null)
!11 = !DISubroutineType(types: !12)
!12 = !{!8, !8}
diff --git a/llvm/test/DebugInfo/Generic/piece-verifier.ll b/llvm/test/DebugInfo/Generic/piece-verifier.ll
index 20d8e897e66..e1f5c24a21d 100644
--- a/llvm/test/DebugInfo/Generic/piece-verifier.ll
+++ b/llvm/test/DebugInfo/Generic/piece-verifier.ll
@@ -3,7 +3,7 @@ target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.9.0"
; Function Attrs: nounwind ssp uwtable
-define i32 @foo(i64 %s.coerce0, i32 %s.coerce1) #0 {
+define i32 @foo(i64 %s.coerce0, i32 %s.coerce1) #0 !dbg !4 {
entry:
call void @llvm.dbg.value(metadata i64 %s.coerce0, i64 0, metadata !20, metadata !24), !dbg !21
call void @llvm.dbg.value(metadata i32 %s.coerce1, i64 0, metadata !22, metadata !27), !dbg !21
@@ -27,7 +27,7 @@ attributes #1 = { nounwind readnone }
!1 = !DIFile(filename: "pieces.c", directory: "")
!2 = !{}
!3 = !{!4}
-!4 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !1, scope: !5, type: !6, function: i32 (i64, i32)* @foo, variables: !15)
+!4 = distinct !DISubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !15)
!5 = !DIFile(filename: "pieces.c", directory: "")
!6 = !DISubroutineType(types: !7)
!7 = !{!8, !9}
diff --git a/llvm/test/DebugInfo/Generic/recursive_inlining.ll b/llvm/test/DebugInfo/Generic/recursive_inlining.ll
index c1fc70b689b..02c147e7aa6 100644
--- a/llvm/test/DebugInfo/Generic/recursive_inlining.ll
+++ b/llvm/test/DebugInfo/Generic/recursive_inlining.ll
@@ -91,7 +91,7 @@
@x = global %struct.C* null, align 8
; Function Attrs: nounwind
-define void @_Z3fn6v() #0 {
+define void @_Z3fn6v() #0 !dbg !14 {
entry:
tail call void @_Z3fn8v() #3, !dbg !31
%0 = load %struct.C*, %struct.C** @x, align 8, !dbg !32, !tbaa !33
@@ -114,7 +114,7 @@ _ZN1C5m_fn2Ev.exit: ; preds = %entry, %if.then.i
declare void @_Z3fn8v() #1
; Function Attrs: nounwind
-define linkonce_odr void @_ZN1C5m_fn2Ev(%struct.C* nocapture readonly %this) #0 align 2 {
+define linkonce_odr void @_ZN1C5m_fn2Ev(%struct.C* nocapture readonly %this) #0 align 2 !dbg !22 {
entry:
tail call void @llvm.dbg.value(metadata %struct.C* %this, i64 0, metadata !24, metadata !DIExpression()), !dbg !49
tail call void @_Z3fn8v() #3, !dbg !50
@@ -147,7 +147,7 @@ _Z3fn6v.exit: ; preds = %if.end, %if.then.i.
}
; Function Attrs: nounwind
-define void @_Z3fn3v() #0 {
+define void @_Z3fn3v() #0 !dbg !18 {
entry:
br label %tailrecurse
@@ -170,7 +170,7 @@ if.then.i.i: ; preds = %tailrecurse
}
; Function Attrs: nounwind
-define void @_Z3fn4v() #0 {
+define void @_Z3fn4v() #0 !dbg !19 {
entry:
%0 = load %struct.C*, %struct.C** @x, align 8, !dbg !72, !tbaa !33
tail call void @_ZN1C5m_fn2Ev(%struct.C* %0), !dbg !72
@@ -178,7 +178,7 @@ entry:
}
; Function Attrs: nounwind
-define void @_Z3fn5v() #0 {
+define void @_Z3fn5v() #0 !dbg !20 {
entry:
%0 = load %struct.C*, %struct.C** @x, align 8, !dbg !73, !tbaa !33
tail call void @_ZN1C5m_fn2Ev(%struct.C* %0), !dbg !73
@@ -213,15 +213,15 @@ attributes #3 = { nounwind }
!11 = !{null, !12}
!12 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1C")
!13 = !{!14, !18, !19, !20, !21, !22}
-!14 = distinct !DISubprogram(name: "fn6", linkageName: "_Z3fn6v", line: 15, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 15, file: !5, scope: !15, type: !16, function: void ()* @_Z3fn6v, variables: !2)
+!14 = distinct !DISubprogram(name: "fn6", linkageName: "_Z3fn6v", line: 15, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 15, file: !5, scope: !15, type: !16, variables: !2)
!15 = !DIFile(filename: "recursive_inlining.cpp", directory: "/usr/local/google/home/blaikie/dev/scratch/missing_concrete_variable_on_darwin/reduce")
!16 = !DISubroutineType(types: !17)
!17 = !{null}
-!18 = distinct !DISubprogram(name: "fn3", linkageName: "_Z3fn3v", line: 20, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 20, file: !5, scope: !15, type: !16, function: void ()* @_Z3fn3v, variables: !2)
-!19 = distinct !DISubprogram(name: "fn4", linkageName: "_Z3fn4v", line: 21, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 21, file: !5, scope: !15, type: !16, function: void ()* @_Z3fn4v, variables: !2)
-!20 = distinct !DISubprogram(name: "fn5", linkageName: "_Z3fn5v", line: 22, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 22, file: !5, scope: !15, type: !16, function: void ()* @_Z3fn5v, variables: !2)
+!18 = distinct !DISubprogram(name: "fn3", linkageName: "_Z3fn3v", line: 20, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 20, file: !5, scope: !15, type: !16, variables: !2)
+!19 = distinct !DISubprogram(name: "fn4", linkageName: "_Z3fn4v", line: 21, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 21, file: !5, scope: !15, type: !16, variables: !2)
+!20 = distinct !DISubprogram(name: "fn5", linkageName: "_Z3fn5v", line: 22, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 22, file: !5, scope: !15, type: !16, variables: !2)
!21 = distinct !DISubprogram(name: "fn7", linkageName: "_Z3fn7v", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 14, file: !5, scope: !15, type: !16, variables: !2)
-!22 = distinct !DISubprogram(name: "m_fn2", linkageName: "_ZN1C5m_fn2Ev", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 7, file: !5, scope: !"_ZTS1C", type: !10, function: void (%struct.C*)* @_ZN1C5m_fn2Ev, declaration: !9, variables: !23)
+!22 = distinct !DISubprogram(name: "m_fn2", linkageName: "_ZN1C5m_fn2Ev", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 7, file: !5, scope: !"_ZTS1C", type: !10, declaration: !9, variables: !23)
!23 = !{!24}
!24 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !22, type: !25)
!25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS1C")
diff --git a/llvm/test/DebugInfo/Generic/restrict.ll b/llvm/test/DebugInfo/Generic/restrict.ll
index 49401712ccd..b0536acd03c 100644
--- a/llvm/test/DebugInfo/Generic/restrict.ll
+++ b/llvm/test/DebugInfo/Generic/restrict.ll
@@ -17,7 +17,7 @@
; Function Attrs: nounwind uwtable
-define void @_Z3fooPv(i8* noalias %dst) #0 {
+define void @_Z3fooPv(i8* noalias %dst) #0 !dbg !4 {
entry:
%dst.addr = alloca i8*, align 8
store i8* %dst, i8** %dst.addr, align 8
@@ -39,7 +39,7 @@ attributes #1 = { nounwind readnone }
!1 = !DIFile(filename: "restrict.c", directory: "/tmp/dbginfo")
!2 = !{}
!3 = !{!4}
-!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooPv", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, function: void (i8*)* @_Z3fooPv, variables: !2)
+!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooPv", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2)
!5 = !DIFile(filename: "restrict.c", directory: "/tmp/dbginfo")
!6 = !DISubroutineType(types: !7)
!7 = !{null, !8}
diff --git a/llvm/test/DebugInfo/Generic/sugared-constants.ll b/llvm/test/DebugInfo/Generic/sugared-constants.ll
index 7a344736e43..5e32b794afd 100644
--- a/llvm/test/DebugInfo/Generic/sugared-constants.ll
+++ b/llvm/test/DebugInfo/Generic/sugared-constants.ll
@@ -22,7 +22,7 @@
; CHECK: DW_AT_const_value [DW_FORM_udata] (7)
; Function Attrs: uwtable
-define i32 @main() #0 {
+define i32 @main() #0 !dbg !4 {
entry:
tail call void @llvm.dbg.value(metadata i32 42, i64 0, metadata !10, metadata !DIExpression()), !dbg !21
tail call void @_Z4funci(i32 42), !dbg !22
@@ -54,7 +54,7 @@ attributes #2 = { nounwind readnone }
!1 = !DIFile(filename: "const.cpp", directory: "/tmp/dbginfo")
!2 = !{}
!3 = !{!4}
-!4 = distinct !DISubprogram(name: "main", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 4, file: !1, scope: !5, type: !6, function: i32 ()* @main, variables: !9)
+!4 = distinct !DISubprogram(name: "main", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 4, file: !1, scope: !5, type: !6, variables: !9)
!5 = !DIFile(filename: "const.cpp", directory: "/tmp/dbginfo")
!6 = !DISubroutineType(types: !7)
!7 = !{!8}
diff --git a/llvm/test/DebugInfo/Generic/tu-composite.ll b/llvm/test/DebugInfo/Generic/tu-composite.ll
index 4df4ea8219d..77f99d2f897 100644
--- a/llvm/test/DebugInfo/Generic/tu-composite.ll
+++ b/llvm/test/DebugInfo/Generic/tu-composite.ll
@@ -87,7 +87,7 @@
@_ZTI1C = unnamed_addr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv117__class_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @_ZTS1C, i32 0, i32 0) }
; Function Attrs: nounwind ssp uwtable
-define void @_ZN1C3fooEv(%struct.C* %this) unnamed_addr #0 align 2 {
+define void @_ZN1C3fooEv(%struct.C* %this) unnamed_addr #0 align 2 !dbg !31 {
entry:
%this.addr = alloca %struct.C*, align 8
store %struct.C* %this, %struct.C** %this.addr, align 8
@@ -100,7 +100,7 @@ entry:
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
; Function Attrs: nounwind ssp uwtable
-define void @_Z4testv() #0 {
+define void @_Z4testv() #0 !dbg !32 {
entry:
%B = alloca %struct.bar, align 1
%A = alloca [3 x %struct.bar], align 1
@@ -153,8 +153,8 @@ attributes #1 = { nounwind readnone }
!28 = !{!29}
!29 = !DITemplateTypeParameter(name: "T", type: !"_ZTS3bar")
!30 = !{!31, !32}
-!31 = distinct !DISubprogram(name: "foo", linkageName: "_ZN1C3fooEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: null, type: !14, function: void (%struct.C*)* @_ZN1C3fooEv, declaration: !13, variables: !2)
-!32 = distinct !DISubprogram(name: "test", linkageName: "_Z4testv", line: 20, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 20, file: !1, scope: !7, type: !33, function: void ()* @_Z4testv, variables: !2)
+!31 = distinct !DISubprogram(name: "foo", linkageName: "_ZN1C3fooEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 4, file: !1, scope: null, type: !14, declaration: !13, variables: !2)
+!32 = distinct !DISubprogram(name: "test", linkageName: "_Z4testv", line: 20, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 20, file: !1, scope: !7, type: !33, variables: !2)
!33 = !DISubroutineType(types: !34)
!34 = !{null}
!35 = !{i32 2, !"Dwarf Version", i32 2}
diff --git a/llvm/test/DebugInfo/Generic/two-cus-from-same-file.ll b/llvm/test/DebugInfo/Generic/two-cus-from-same-file.ll
index 4aeaaac22d2..65d376c814d 100644
--- a/llvm/test/DebugInfo/Generic/two-cus-from-same-file.ll
+++ b/llvm/test/DebugInfo/Generic/two-cus-from-same-file.ll
@@ -13,7 +13,7 @@
@str = private unnamed_addr constant [4 x i8] c"FOO\00"
@str1 = private unnamed_addr constant [6 x i8] c"Main!\00"
-define void @foo() nounwind {
+define void @foo() nounwind !dbg !5 {
entry:
%puts = tail call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str, i32 0, i32 0)), !dbg !23
ret void, !dbg !25
@@ -21,7 +21,7 @@ entry:
declare i32 @puts(i8* nocapture) nounwind
-define i32 @main(i32 %argc, i8** nocapture %argv) nounwind {
+define i32 @main(i32 %argc, i8** nocapture %argv) nounwind !dbg !12 {
entry:
tail call void @llvm.dbg.value(metadata i32 %argc, i64 0, metadata !21, metadata !DIExpression()), !dbg !26
tail call void @llvm.dbg.value(metadata i8** %argv, i64 0, metadata !22, metadata !DIExpression()), !dbg !27
@@ -38,13 +38,13 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.2 (trunk 156513)", isOptimized: true, emissionKind: 1, file: !32, enums: !1, retainedTypes: !1, subprograms: !3, globals: !1, imports: !1)
!1 = !{}
!3 = !{!5}
-!5 = distinct !DISubprogram(name: "foo", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 5, file: !32, scope: !6, type: !7, function: void ()* @foo, variables: !1)
+!5 = distinct !DISubprogram(name: "foo", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 5, file: !32, scope: !6, type: !7, variables: !1)
!6 = !DIFile(filename: "foo.c", directory: "/tmp")
!7 = !DISubroutineType(types: !8)
!8 = !{null}
!9 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.2 (trunk 156513)", isOptimized: true, emissionKind: 1, file: !32, enums: !1, retainedTypes: !1, subprograms: !10, globals: !1, imports: !1)
!10 = !{!12}
-!12 = distinct !DISubprogram(name: "main", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 11, file: !32, scope: !6, type: !13, function: i32 (i32, i8**)* @main, variables: !19)
+!12 = distinct !DISubprogram(name: "main", line: 11, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 11, file: !32, scope: !6, type: !13, variables: !19)
!13 = !DISubroutineType(types: !14)
!14 = !{!15, !15, !16}
!15 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
diff --git a/llvm/test/DebugInfo/Generic/unconditional-branch.ll b/llvm/test/DebugInfo/Generic/unconditional-branch.ll
index d4d7fb82741..9325e1b27ad 100644
--- a/llvm/test/DebugInfo/Generic/unconditional-branch.ll
+++ b/llvm/test/DebugInfo/Generic/unconditional-branch.ll
@@ -18,7 +18,7 @@
;}
; Function Attrs: nounwind
-define void @foo(i32 %i) #0 {
+define void @foo(i32 %i) #0 !dbg !4 {
entry:
%i.addr = alloca i32, align 4
store i32 %i, i32* %i.addr, align 4
@@ -49,7 +49,7 @@ attributes #1 = { nounwind readnone }
!1 = !DIFile(filename: "test.c", directory: "D:\5Cwork\5CEPRs\5C396363")
!2 = !{}
!3 = !{!4}
-!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, function: void (i32)* @foo, variables: !2)
+!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2)
!5 = !DIFile(filename: "test.c", directory: "D:CworkCEPRsC396363")
!6 = !DISubroutineType(types: !7)
!7 = !{null, !8}
diff --git a/llvm/test/DebugInfo/Generic/varargs.ll b/llvm/test/DebugInfo/Generic/varargs.ll
index 1b5a921ad53..8567bf71514 100644
--- a/llvm/test/DebugInfo/Generic/varargs.ll
+++ b/llvm/test/DebugInfo/Generic/varargs.ll
@@ -50,7 +50,7 @@
%struct.A = type { i8 }
; Function Attrs: nounwind ssp uwtable
-define void @_Z1biz(i32 %c, ...) #0 {
+define void @_Z1biz(i32 %c, ...) #0 !dbg !14 {
%1 = alloca i32, align 4
%a = alloca %struct.A, align 1
%fptr = alloca void (i32, ...)*, align 8
@@ -84,7 +84,7 @@ attributes #1 = { nounwind readnone }
!9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !"_ZTS1A")
!10 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!13 = !{!14}
-!14 = distinct !DISubprogram(name: "b", linkageName: "_Z1biz", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 13, file: !1, scope: !15, type: !16, function: void (i32, ...)* @_Z1biz, variables: !2)
+!14 = distinct !DISubprogram(name: "b", linkageName: "_Z1biz", line: 13, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 13, file: !1, scope: !15, type: !16, variables: !2)
!15 = !DIFile(filename: "llvm/tools/clang/test/CodeGenCXX/debug-info-varargs.cpp", directory: "radar/13690847")
!16 = !DISubroutineType(types: !17)
!17 = !{null, !10, null}
diff --git a/llvm/test/DebugInfo/Generic/version.ll b/llvm/test/DebugInfo/Generic/version.ll
index d0caa295cc2..936e0887223 100644
--- a/llvm/test/DebugInfo/Generic/version.ll
+++ b/llvm/test/DebugInfo/Generic/version.ll
@@ -6,7 +6,7 @@
; Make sure we are generating DWARF version 3 when module flag says so.
; CHECK: Compile Unit: length = {{.*}} version = 0x0003
-define i32 @main() #0 {
+define i32 @main() #0 !dbg !4 {
entry:
%retval = alloca i32, align 4
store i32 0, i32* %retval
@@ -22,7 +22,7 @@ attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointe
!1 = !DIFile(filename: "CodeGen/dwarf-version.c", directory: "test")
!2 = !{}
!3 = !{!4}
-!4 = distinct !DISubprogram(name: "main", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: !5, type: !6, function: i32 ()* @main, variables: !2)
+!4 = distinct !DISubprogram(name: "main", line: 6, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 6, file: !1, scope: !5, type: !6, variables: !2)
!5 = !DIFile(filename: "CodeGen/dwarf-version.c", directory: "test")
!6 = !DISubroutineType(types: !7)
!7 = !{!8}
OpenPOWER on IntegriCloud