Renumber testcase metadata nodes after r290153.
This patch renumbers the metadata nodes in debug info testcases after
https://reviews.llvm.org/D26769. This is a separate patch because it
causes so much churn. This was implemented with a python script that
pipes the testcases through llvm-as - | llvm-dis - and then goes
through the original and new output side-by side to insert all
comments at a close-enough location.
Differential Revision: https://reviews.llvm.org/D27765
llvm-svn: 290292
diff --git a/llvm/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll b/llvm/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll
index afa846e..d442bdd 100644
--- a/llvm/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll
+++ b/llvm/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll
@@ -3,37 +3,46 @@
; ModuleID = 'test.c'
-@GLB = common global i32 0, align 4, !dbg !14
+source_filename = "test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll"
-define i32 @f() nounwind !dbg !5 {
+@GLB = common global i32 0, align 4, !dbg !0
+
+; Function Attrs: nounwind
+define i32 @f() #0 !dbg !8 {
%LOC = alloca i32, align 4
- call void @llvm.dbg.declare(metadata i32* %LOC, metadata !15, metadata !DIExpression()), !dbg !17
- %1 = load i32, i32* @GLB, align 4, !dbg !18
- store i32 %1, i32* %LOC, align 4, !dbg !18
- %2 = load i32, i32* @GLB, align 4, !dbg !19
- ret i32 %2, !dbg !19
+ call void @llvm.dbg.declare(metadata i32* %LOC, metadata !11, metadata !13), !dbg !14
+ %1 = load i32, i32* @GLB, align 4, !dbg !15
+ store i32 %1, i32* %LOC, align 4, !dbg !15
+ %2 = load i32, i32* @GLB, align 4, !dbg !16
+ ret i32 %2, !dbg !16
}
-declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
+; Function Attrs: nounwind readnone
+declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!21}
+attributes #0 = { nounwind }
+attributes #1 = { nounwind readnone }
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk)", isOptimized: false, emissionKind: FullDebug, file: !20, enums: !1, retainedTypes: !1, globals: !12, imports: !1)
-!1 = !{}
-!5 = distinct !DISubprogram(name: "f", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, file: !6, scope: !6, type: !7)
-!6 = !DIFile(filename: "test.c", directory: "/work/llvm/vanilla/test/DebugInfo")
-!7 = !DISubroutineType(types: !8)
-!8 = !{!9}
-!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!12 = !{!14}
-!14 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "GLB", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !9))
-!15 = !DILocalVariable(name: "LOC", line: 4, scope: !16, file: !6, type: !9)
-!16 = distinct !DILexicalBlock(line: 3, column: 9, file: !20, scope: !5)
-!17 = !DILocation(line: 4, column: 9, scope: !16)
-!18 = !DILocation(line: 4, column: 23, scope: !16)
-!19 = !DILocation(line: 5, column: 5, scope: !16)
-!20 = !DIFile(filename: "test.c", directory: "/work/llvm/vanilla/test/DebugInfo")
+!llvm.dbg.cu = !{!4}
+!llvm.module.flags = !{!7}
+
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "GLB", scope: null, file: !2, line: 1, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "test.c", directory: "/work/llvm/vanilla/test/DebugInfo")
+!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!4 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 3.0 (trunk)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !5, globals: !6, imports: !5)
+!5 = !{}
+!6 = !{!0}
+!7 = !{i32 1, !"Debug Info Version", i32 3}
+!8 = distinct !DISubprogram(name: "f", scope: !2, file: !2, line: 3, type: !9, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !4)
+!9 = !DISubroutineType(types: !10)
+!10 = !{!3}
+!11 = !DILocalVariable(name: "LOC", scope: !12, file: !2, line: 4, type: !3)
+!12 = distinct !DILexicalBlock(scope: !8, file: !2, line: 3, column: 9)
+!13 = !DIExpression()
+!14 = !DILocation(line: 4, column: 9, scope: !12)
+!15 = !DILocation(line: 4, column: 23, scope: !12)
+!16 = !DILocation(line: 5, column: 5, scope: !12)
; CHECK: DW_TAG_variable
; CHECK-NOT: DW_TAG
@@ -51,4 +60,3 @@
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_decl_line [DW_FORM_data1] (4)
-!21 = !{i32 1, !"Debug Info Version", i32 3}
diff --git a/llvm/test/DebugInfo/X86/DIModuleContext.ll b/llvm/test/DebugInfo/X86/DIModuleContext.ll
index d757c20..a63fd0f 100644
--- a/llvm/test/DebugInfo/X86/DIModuleContext.ll
+++ b/llvm/test/DebugInfo/X86/DIModuleContext.ll
@@ -1,3 +1,4 @@
+source_filename = "test/DebugInfo/X86/DIModuleContext.ll"
target triple = "x86_64-apple-macosx"
; RUN: %llc_dwarf %s -o - -filetype=obj \
; RUN: | llvm-dwarfdump -debug-dump=info - | FileCheck %s
@@ -11,20 +12,22 @@
%struct.s = type opaque
-@i = common global %struct.s* null, align 8, !dbg !4
+@i = common global %struct.s* null, align 8, !dbg !0
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!7, !8}
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!11, !12}
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !3, imports: !11)
-!1 = !DIFile(filename: "test.c", directory: "/")
-!2 = !{}
-!3 = !{!4}
-!4 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "s", scope: !0, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true))
-!5 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 64, align: 64)
-!6 = !DICompositeType(tag: DW_TAG_structure_type, name: "s", scope: !9, file: !1, line: 1, flags: DIFlagFwdDecl)
-!7 = !{i32 2, !"Dwarf Version", i32 2}
-!8 = !{i32 2, !"Debug Info Version", i32 3}
-!9 = !DIModule(scope: null, name: "Module", configMacros: "", includePath: ".", isysroot: "/")
-!10 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !0, entity: !9, line: 11)
-!11 = !{!10}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "s", scope: !2, file: !3, line: 2, type: !9, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, imports: !6)
+!3 = !DIFile(filename: "test.c", directory: "/")
+!4 = !{}
+!5 = !{!0}
+!6 = !{!7}
+!7 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !8, line: 11)
+!8 = !DIModule(scope: null, name: "Module", includePath: ".", isysroot: "/")
+!9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10, size: 64, align: 64)
+!10 = !DICompositeType(tag: DW_TAG_structure_type, name: "s", scope: !8, file: !3, line: 1, flags: DIFlagFwdDecl)
+!11 = !{i32 2, !"Dwarf Version", i32 2}
+!12 = !{i32 2, !"Debug Info Version", i32 3}
+
diff --git a/llvm/test/DebugInfo/X86/DW_AT_calling-convention.ll b/llvm/test/DebugInfo/X86/DW_AT_calling-convention.ll
index 536216c..f66841c 100644
--- a/llvm/test/DebugInfo/X86/DW_AT_calling-convention.ll
+++ b/llvm/test/DebugInfo/X86/DW_AT_calling-convention.ll
@@ -42,15 +42,15 @@
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
target triple = "i386-pc-windows-msvc19.0.23918"
-@"\01?fptr@@3P6IHHH@ZA" = global i32 (i32, i32)* @"\01?f@@YIHHH@Z", align 4, !dbg !4
+@"\01?fptr@@3P6IHHH@ZA" = global i32 (i32, i32)* @"\01?f@@YIHHH@Z", align 4, !dbg !0
; Function Attrs: nounwind readnone
-define x86_fastcallcc i32 @"\01?f@@YIHHH@Z"(i32 inreg %a, i32 inreg %b) #0 !dbg !12 {
+define x86_fastcallcc i32 @"\01?f@@YIHHH@Z"(i32 inreg %a, i32 inreg %b) #0 !dbg !13 {
entry:
- tail call void @llvm.dbg.value(metadata i32 %b, i64 0, metadata !14, metadata !16), !dbg !17
- tail call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !15, metadata !16), !dbg !18
- %add = add nsw i32 %b, %a, !dbg !19
- ret i32 %add, !dbg !20
+ tail call void @llvm.dbg.value(metadata i32 %b, i64 0, metadata !15, metadata !17), !dbg !18
+ tail call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !16, metadata !17), !dbg !19
+ %add = add nsw i32 %b, %a, !dbg !20
+ ret i32 %add, !dbg !21
}
; Function Attrs: nounwind readnone
@@ -59,28 +59,30 @@
attributes #0 = { nounwind readnone "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="pentium4" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { nounwind readnone }
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!9, !10}
-!llvm.ident = !{!11}
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!10, !11}
+!llvm.ident = !{!12}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 (trunk 272067)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !3)
-!1 = !DIFile(filename: "t.cpp", directory: "D:\5Csrc\5Cllvm\5Cbuild")
-!2 = !{}
-!3 = !{!4}
-!4 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "fptr", linkageName: "\01?fptr@@3P6IHHH@ZA", scope: !0, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true))
-!5 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 32, align: 32)
-!6 = !DISubroutineType(cc: DW_CC_BORLAND_msfastcall, types: !7)
-!7 = !{!8, !8, !8}
-!8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!9 = !{i32 2, !"Dwarf Version", i32 4}
-!10 = !{i32 2, !"Debug Info Version", i32 3}
-!11 = !{!"clang version 3.9.0 (trunk 272067)"}
-!12 = distinct !DISubprogram(name: "f", linkageName: "\01?f@@YIHHH@Z", scope: !1, file: !1, line: 1, type: !6, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !13)
-!13 = !{!14, !15}
-!14 = !DILocalVariable(name: "b", arg: 2, scope: !12, file: !1, line: 1, type: !8)
-!15 = !DILocalVariable(name: "a", arg: 1, scope: !12, file: !1, line: 1, type: !8)
-!16 = !DIExpression()
-!17 = !DILocation(line: 1, column: 29, scope: !12)
-!18 = !DILocation(line: 1, column: 22, scope: !12)
-!19 = !DILocation(line: 1, column: 43, scope: !12)
-!20 = !DILocation(line: 1, column: 34, scope: !12)
+!0 = distinct !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "fptr", linkageName: "\01?fptr@@3P6IHHH@ZA", scope: !2, file: !3, line: 2, type: !6, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 3.9.0 (trunk 272067)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
+!3 = !DIFile(filename: "t.cpp", directory: "D:\5Csrc\5Cllvm\5Cbuild")
+!4 = !{}
+!5 = !{!0}
+!6 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 32, align: 32)
+!7 = !DISubroutineType(cc: DW_CC_BORLAND_msfastcall, types: !8)
+!8 = !{!9, !9, !9}
+!9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!10 = !{i32 2, !"Dwarf Version", i32 4}
+!11 = !{i32 2, !"Debug Info Version", i32 3}
+!12 = !{!"clang version 3.9.0 (trunk 272067)"}
+!13 = distinct !DISubprogram(name: "f", linkageName: "\01?f@@YIHHH@Z", scope: !3, file: !3, line: 1, type: !7, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !2, variables: !14)
+!14 = !{!15, !16}
+!15 = !DILocalVariable(name: "b", arg: 2, scope: !13, file: !3, line: 1, type: !9)
+!16 = !DILocalVariable(name: "a", arg: 1, scope: !13, file: !3, line: 1, type: !9)
+!17 = !DIExpression()
+!18 = !DILocation(line: 1, column: 29, scope: !13)
+!19 = !DILocation(line: 1, column: 22, scope: !13)
+!20 = !DILocation(line: 1, column: 43, scope: !13)
+!21 = !DILocation(line: 1, column: 34, scope: !13)
+
diff --git a/llvm/test/DebugInfo/X86/DW_AT_specification.ll b/llvm/test/DebugInfo/X86/DW_AT_specification.ll
index 3241319..49147f3 100644
--- a/llvm/test/DebugInfo/X86/DW_AT_specification.ll
+++ b/llvm/test/DebugInfo/X86/DW_AT_specification.ll
@@ -9,33 +9,35 @@
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_specification {{.*}} "_ZN3foo3barEv"
+source_filename = "test/DebugInfo/X86/DW_AT_specification.ll"
-@_ZZN3foo3barEvE1x = constant i32 0, align 4, !dbg !20
+@_ZZN3foo3barEvE1x = constant i32 0, align 4, !dbg !0
-define void @_ZN3foo3barEv() !dbg !5 {
+define void @_ZN3foo3barEv() !dbg !2 {
entry:
- ret void, !dbg !25
+ ret void, !dbg !17
}
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!28}
+!llvm.dbg.cu = !{!8}
+!llvm.module.flags = !{!16}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.0 ()", isOptimized: false, emissionKind: FullDebug, file: !27, enums: !1, retainedTypes: !1, globals: !18, imports: !1)
-!1 = !{}
-!5 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3foo3barEv", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 4, file: !6, scope: null, type: !7, declaration: !11)
-!6 = !DIFile(filename: "nsNativeAppSupportBase.ii", directory: "/Users/espindola/mozilla-central/obj-x86_64-apple-darwin11.2.0/toolkit/library")
-!7 = !DISubroutineType(types: !8)
-!8 = !{null, !9}
-!9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !10)
-!10 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", line: 1, flags: DIFlagFwdDecl, file: !27)
-!11 = !DISubprogram(name: "bar", linkageName: "_ZN3foo3barEv", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !6, scope: !12, type: !7)
-!12 = !DICompositeType(tag: DW_TAG_class_type, name: "foo", line: 1, size: 8, align: 8, file: !27, elements: !13)
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "x", scope: !2, file: !3, line: 5, type: !14, isLocal: true, isDefinition: true)
+!2 = distinct !DISubprogram(name: "bar", linkageName: "_ZN3foo3barEv", scope: null, file: !3, line: 4, type: !4, isLocal: false, isDefinition: true, scopeLine: 4, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !8, declaration: !11)
+!3 = !DIFile(filename: "nsNativeAppSupportBase.ii", directory: "/Users/espindola/mozilla-central/obj-x86_64-apple-darwin11.2.0/toolkit/library")
+!4 = !DISubroutineType(types: !5)
+!5 = !{null, !6}
+!6 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64, align: 64, flags: DIFlagArtificial)
+!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", file: !3, line: 1, flags: DIFlagFwdDecl)
+!8 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 3.0 ()", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !9, retainedTypes: !9, globals: !10, imports: !9)
+!9 = !{}
+!10 = !{!0}
+!11 = !DISubprogram(name: "bar", linkageName: "_ZN3foo3barEv", scope: !12, file: !3, line: 2, type: !4, isLocal: false, isDefinition: false, scopeLine: 2, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false)
+!12 = !DICompositeType(tag: DW_TAG_class_type, name: "foo", file: !3, line: 1, size: 8, align: 8, elements: !13)
!13 = !{!11}
-!18 = !{!20}
-!20 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "x", line: 5, isLocal: true, isDefinition: true, scope: !5, file: !6, type: !21))
-!21 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !22)
-!22 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!25 = !DILocation(line: 6, column: 1, scope: !26)
-!26 = distinct !DILexicalBlock(line: 4, column: 17, file: !6, scope: !5)
-!27 = !DIFile(filename: "nsNativeAppSupportBase.ii", directory: "/Users/espindola/mozilla-central/obj-x86_64-apple-darwin11.2.0/toolkit/library")
-!28 = !{i32 1, !"Debug Info Version", i32 3}
+!14 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !15)
+!15 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!16 = !{i32 1, !"Debug Info Version", i32 3}
+!17 = !DILocation(line: 6, column: 1, scope: !18)
+!18 = distinct !DILexicalBlock(scope: !2, file: !3, line: 4, column: 17)
+
diff --git a/llvm/test/DebugInfo/X86/DW_TAG_friend.ll b/llvm/test/DebugInfo/X86/DW_TAG_friend.ll
index 7b31a58..383d125 100644
--- a/llvm/test/DebugInfo/X86/DW_TAG_friend.ll
+++ b/llvm/test/DebugInfo/X86/DW_TAG_friend.ll
@@ -8,37 +8,40 @@
; CHECK: DW_TAG_friend
; CHECK-NEXT: DW_AT_friend [DW_FORM_ref4] (cu + 0x{{[0-9a-f]*}} => {[[BACK]]})
+source_filename = "test/DebugInfo/X86/DW_TAG_friend.ll"
%class.A = type { i32 }
%class.B = type { i32 }
-@a = global %class.A zeroinitializer, align 4, !dbg !5
-@b = global %class.B zeroinitializer, align 4, !dbg !17
+@a = global %class.A zeroinitializer, align 4, !dbg !0
+@b = global %class.B zeroinitializer, align 4, !dbg !11
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!29}
+!llvm.dbg.cu = !{!21}
+!llvm.module.flags = !{!24}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.1 (trunk 153413) (llvm/trunk 153428)", isOptimized: false, emissionKind: FullDebug, file: !28, enums: !1, retainedTypes: !1, globals: !3, imports: !1)
-!1 = !{}
-!3 = !{!5, !17}
-!5 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", line: 10, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7))
-!6 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo/tmp")
-!7 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 1, size: 32, align: 32, file: !28, elements: !8)
-!8 = !{!9, !11}
-!9 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, flags: DIFlagPrivate, file: !28, scope: !7, baseType: !10)
-!10 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!11 = !DISubprogram(name: "A", line: 1, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !6, scope: !7, type: !12)
-!12 = !DISubroutineType(types: !13)
-!13 = !{null, !14}
-!14 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !7)
-!17 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "b", line: 11, isLocal: false, isDefinition: true, scope: null, file: !6, type: !18))
-!18 = !DICompositeType(tag: DW_TAG_class_type, name: "B", line: 5, size: 32, align: 32, file: !28, elements: !19)
-!19 = !{!20, !21, !27}
-!20 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 7, size: 32, align: 32, flags: DIFlagPrivate, file: !28, scope: !18, baseType: !10)
-!21 = !DISubprogram(name: "B", line: 5, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !6, scope: !18, type: !22)
-!22 = !DISubroutineType(types: !23)
-!23 = !{null, !24}
-!24 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !18)
-!27 = !DIDerivedType(tag: DW_TAG_friend, file: !28, baseType: !7)
-!28 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo/tmp")
-!29 = !{i32 1, !"Debug Info Version", i32 3}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "a", scope: null, file: !2, line: 10, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo/tmp")
+!3 = !DICompositeType(tag: DW_TAG_class_type, name: "A", file: !2, line: 1, size: 32, align: 32, elements: !4)
+!4 = !{!5, !7}
+!5 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !3, file: !2, line: 2, baseType: !6, size: 32, align: 32, flags: DIFlagPrivate)
+!6 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!7 = !DISubprogram(name: "A", scope: !3, file: !2, line: 1, type: !8, isLocal: false, isDefinition: false, scopeLine: 1, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false)
+!8 = !DISubroutineType(types: !9)
+!9 = !{null, !10}
+!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !3, size: 64, align: 64, flags: DIFlagArtificial)
+!11 = !DIGlobalVariableExpression(var: !12)
+!12 = !DIGlobalVariable(name: "b", scope: null, file: !2, line: 11, type: !13, isLocal: false, isDefinition: true)
+!13 = !DICompositeType(tag: DW_TAG_class_type, name: "B", file: !2, line: 5, size: 32, align: 32, elements: !14)
+!14 = !{!15, !16, !20}
+!15 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !13, file: !2, line: 7, baseType: !6, size: 32, align: 32, flags: DIFlagPrivate)
+!16 = !DISubprogram(name: "B", scope: !13, file: !2, line: 5, type: !17, isLocal: false, isDefinition: false, scopeLine: 5, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false)
+!17 = !DISubroutineType(types: !18)
+!18 = !{null, !19}
+!19 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !13, size: 64, align: 64, flags: DIFlagArtificial)
+!20 = !DIDerivedType(tag: DW_TAG_friend, file: !2, baseType: !3)
+!21 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.1 (trunk 153413) (llvm/trunk 153428)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !22, retainedTypes: !22, globals: !23, imports: !22)
+!22 = !{}
+!23 = !{!0, !11}
+!24 = !{i32 1, !"Debug Info Version", i32 3}
+
diff --git a/llvm/test/DebugInfo/X86/InlinedFnLocalVar.ll b/llvm/test/DebugInfo/X86/InlinedFnLocalVar.ll
index bac5a87..b458693 100644
--- a/llvm/test/DebugInfo/X86/InlinedFnLocalVar.ll
+++ b/llvm/test/DebugInfo/X86/InlinedFnLocalVar.ll
@@ -4,57 +4,61 @@
; CHECK: Lsection_info
; CHECK: DW_TAG_structure_type
; CHECK-NEXT: info_string
-
-@i = common global i32 0, !dbg !16 ; <i32*> [#uses=2]
+source_filename = "test/DebugInfo/X86/InlinedFnLocalVar.ll"
-declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
+@i = common global i32 0, !dbg !0
-declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone
+; Function Attrs: nounwind readnone
+declare void @llvm.dbg.declare(metadata, metadata, metadata) #0
-define i32 @bar() nounwind ssp !dbg !6 {
+; Function Attrs: nounwind readnone
+declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #0
+
+; Function Attrs: nounwind ssp
+define i32 @bar() #1 !dbg !8 {
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 !109, metadata !DIExpression()), !dbg !19
- tail call void @llvm.dbg.declare(metadata !29, metadata !110, metadata !DIExpression()), !dbg !21
- %1 = mul nsw i32 %0, %0, !dbg !22 ; <i32> [#uses=2]
- store i32 %1, i32* @i, align 4, !dbg !17
- ret i32 %1, !dbg !23
+ %0 = load i32, i32* @i, align 4, !dbg !11
+ tail call void @llvm.dbg.value(metadata i32 %0, i64 0, metadata !13, metadata !24), !dbg !25
+ tail call void @llvm.dbg.declare(metadata !5, metadata !18, metadata !24), !dbg !26
+ %1 = mul nsw i32 %0, %0, !dbg !27
+ store i32 %1, i32* @i, align 4, !dbg !11
+ ret i32 %1, !dbg !28
}
-!llvm.dbg.cu = !{!2}
-!llvm.module.flags = !{!28}
+attributes #0 = { nounwind readnone }
+attributes #1 = { nounwind ssp }
-!0 = distinct !DISubprogram(name: "foo", line: 9, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2, scopeLine: 9, file: !27, scope: !1, type: !3, variables: !24)
-!1 = !DIFile(filename: "bar.c", directory: "/tmp/")
-!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !27, enums: !20, retainedTypes: !20, globals: !26, imports: !20)
-!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, unit: !2, 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)
-!10 = !DILocalVariable(name: "xyz", line: 10, scope: !11, file: !1, type: !12)
+!llvm.dbg.cu = !{!4}
+!llvm.module.flags = !{!7}
-!109 = !DILocalVariable(name: "j", line: 9, arg: 1, scope: !0, file: !1, type: !5)
-!110 = !DILocalVariable(name: "xyz", line: 10, scope: !11, file: !1, type: !12)
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "i", scope: !2, file: !2, line: 5, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "bar.c", directory: "/tmp/")
+!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!4 = distinct !DICompileUnit(language: DW_LANG_C89, file: !2, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !5, globals: !6, imports: !5)
+!5 = !{}
+!6 = !{!0}
+!7 = !{i32 1, !"Debug Info Version", i32 3}
+!8 = distinct !DISubprogram(name: "bar", linkageName: "bar", scope: !2, file: !2, line: 14, type: !9, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !4)
+!9 = !DISubroutineType(types: !10)
+!10 = !{!3}
+!11 = !DILocation(line: 15, scope: !12)
+!12 = distinct !DILexicalBlock(scope: !8, file: !2, line: 14)
+!13 = !DILocalVariable(name: "j", arg: 1, scope: !14, file: !2, line: 9, type: !3)
+!14 = distinct !DISubprogram(name: "foo", scope: !2, file: !2, line: 9, type: !15, isLocal: true, isDefinition: true, scopeLine: 9, virtualIndex: 6, isOptimized: true, unit: !4, variables: !17)
+!15 = !DISubroutineType(types: !16)
+!16 = !{!3, !3}
+!17 = !{!13, !18}
+!18 = !DILocalVariable(name: "xyz", scope: !19, file: !2, line: 10, type: !20)
+!19 = distinct !DILexicalBlock(scope: !14, file: !2, line: 9)
+!20 = !DICompositeType(tag: DW_TAG_structure_type, name: "X", scope: !14, file: !2, line: 10, size: 64, align: 32, elements: !21)
+!21 = !{!22, !23}
+!22 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !20, file: !2, line: 10, baseType: !3, size: 32, align: 32)
+!23 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !20, file: !2, line: 10, baseType: !3, size: 32, align: 32, offset: 32)
+!24 = !DIExpression()
+!25 = !DILocation(line: 9, scope: !14, inlinedAt: !11)
+!26 = !DILocation(line: 9, scope: !19, inlinedAt: !11)
+!27 = !DILocation(line: 11, scope: !19, inlinedAt: !11)
+!28 = !DILocation(line: 16, scope: !12)
-!11 = distinct !DILexicalBlock(line: 9, column: 0, file: !1, scope: !0)
-!12 = !DICompositeType(tag: DW_TAG_structure_type, name: "X", line: 10, size: 64, align: 32, file: !27, scope: !0, elements: !13)
-!13 = !{!14, !15}
-!14 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 10, size: 32, align: 32, file: !27, scope: !12, baseType: !5)
-!15 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 10, size: 32, align: 32, offset: 32, file: !27, scope: !12, baseType: !5)
-!16 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "i", line: 5, isLocal: false, isDefinition: true, scope: !1, file: !1, type: !5))
-!17 = !DILocation(line: 15, scope: !18)
-!18 = distinct !DILexicalBlock(line: 14, column: 0, file: !1, scope: !6)
-!19 = !DILocation(line: 9, scope: !0, inlinedAt: !17)
-!20 = !{}
-!21 = !DILocation(line: 9, scope: !11, inlinedAt: !17)
-!22 = !DILocation(line: 11, scope: !11, inlinedAt: !17)
-!23 = !DILocation(line: 16, scope: !18)
-!24 = !{!9, !10}
-!26 = !{!16}
-!27 = !DIFile(filename: "bar.c", directory: "/tmp/")
-!28 = !{i32 1, !"Debug Info Version", i32 3}
-!29 = !{null}
diff --git a/llvm/test/DebugInfo/X86/PR26148.ll b/llvm/test/DebugInfo/X86/PR26148.ll
index 98f2592..1f66b75 100644
--- a/llvm/test/DebugInfo/X86/PR26148.ll
+++ b/llvm/test/DebugInfo/X86/PR26148.ll
@@ -28,76 +28,84 @@
; CHECK: Location description: 10 03 93 04 10 00
; constu 0x00000003, piece 0x00000004, constu 0x00000000, piece 0x00000004
+source_filename = "test/DebugInfo/X86/PR26148.ll"
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.11.0"
%struct.S0 = type { i16, i32 }
-@a = common global %struct.S0 zeroinitializer, align 4, !dbg !21
+@a = common global %struct.S0 zeroinitializer, align 4, !dbg !0
-declare void @llvm.dbg.declare(metadata, metadata, metadata)
-declare void @llvm.dbg.value(metadata, i64, metadata, metadata)
+; Function Attrs: nounwind readnone
+declare void @llvm.dbg.declare(metadata, metadata, metadata) #0
+; Function Attrs: nounwind readnone
+declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #0
; The attributes are here to force the zero-sized range not to be at the start of
; the function, which has special interpretation in DWARF. The fact that this happens
; at all is probably an LLVM bug.
-attributes #0 = { "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" }
-define void @fn1(i16 signext %p1) #0 !dbg !4 {
+
+define void @fn1(i16 signext %p1) #1 !dbg !16 {
entry:
- tail call void @llvm.dbg.value(metadata i16 %p1, i64 0, metadata !9, metadata !26), !dbg !27
- tail call void @llvm.dbg.declare(metadata %struct.S0* undef, metadata !10, metadata !26), !dbg !28
- tail call void @llvm.dbg.declare(metadata %struct.S0* undef, metadata !16, metadata !26), !dbg !29
- tail call void @llvm.dbg.value(metadata i32 3, i64 0, metadata !16, metadata !30), !dbg !29
- tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !16, metadata !31), !dbg !29
- tail call void @llvm.dbg.value(metadata i16 %p1, i64 0, metadata !10, metadata !32), !dbg !28
- tail call void @llvm.dbg.value(metadata i32 3, i64 0, metadata !10, metadata !30), !dbg !28
- tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !10, metadata !31), !dbg !28
- store i32 3, i32* bitcast (%struct.S0* @a to i32*), align 4, !dbg !33
- store i32 0, i32* getelementptr inbounds (%struct.S0, %struct.S0* @a, i64 0, i32 1), align 4, !dbg !33
- ret void, !dbg !34
+ tail call void @llvm.dbg.value(metadata i16 %p1, i64 0, metadata !20, metadata !23), !dbg !24
+ tail call void @llvm.dbg.declare(metadata %struct.S0* undef, metadata !21, metadata !23), !dbg !25
+ tail call void @llvm.dbg.declare(metadata %struct.S0* undef, metadata !22, metadata !23), !dbg !26
+ tail call void @llvm.dbg.value(metadata i32 3, i64 0, metadata !22, metadata !27), !dbg !26
+ tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !22, metadata !28), !dbg !26
+ tail call void @llvm.dbg.value(metadata i16 %p1, i64 0, metadata !21, metadata !29), !dbg !25
+ tail call void @llvm.dbg.value(metadata i32 3, i64 0, metadata !21, metadata !27), !dbg !25
+ tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !21, metadata !28), !dbg !25
+ store i32 3, i32* bitcast (%struct.S0* @a to i32*), align 4, !dbg !30
+ store i32 0, i32* getelementptr inbounds (%struct.S0, %struct.S0* @a, i64 0, i32 1), align 4, !dbg !30
+ ret void, !dbg !31
}
-define i32 @main() !dbg !17 {
+define i32 @main() !dbg !32 {
entry:
ret i32 0, !dbg !35
}
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!22, !23, !24}
-!llvm.ident = !{!25}
+attributes #0 = { nounwind readnone }
+attributes #1 = { "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" }
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (https://github.com/llvm-mirror/clang 8f258397c5afd7a708bd95770c718e81d08fb11a) (https://github.com/llvm-mirror/llvm 18481855bdfa1b4a424f81be8525db002671348d)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !20)
-!1 = !DIFile(filename: "small.c", directory: "/Users/kfischer/Projects/clangbug")
-!2 = !{}
-!4 = distinct !DISubprogram(name: "fn1", scope: !1, file: !1, line: 5, type: !5, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !8)
-!5 = !DISubroutineType(types: !6)
-!6 = !{null, !7}
-!7 = !DIBasicType(name: "short", size: 16, align: 16, encoding: DW_ATE_signed)
-!8 = !{!9, !10, !16}
-!9 = !DILocalVariable(name: "p1", arg: 1, scope: !4, file: !1, line: 5, type: !7)
-!10 = !DILocalVariable(name: "b", scope: !4, file: !1, line: 6, type: !11)
-!11 = !DICompositeType(tag: DW_TAG_structure_type, name: "S0", file: !1, line: 1, size: 64, align: 32, elements: !12)
-!12 = !{!13, !14}
-!13 = !DIDerivedType(tag: DW_TAG_member, name: "f0", scope: !11, file: !1, line: 2, baseType: !7, size: 16, align: 16)
-!14 = !DIDerivedType(tag: DW_TAG_member, name: "f3", scope: !11, file: !1, line: 3, baseType: !15, size: 32, align: 32, offset: 32)
-!15 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!16 = !DILocalVariable(name: "c", scope: !4, file: !1, line: 6, type: !11)
-!17 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 11, type: !18, isLocal: false, isDefinition: true, scopeLine: 11, isOptimized: true, unit: !0, variables: !2)
-!18 = !DISubroutineType(types: !19)
-!19 = !{!15}
-!20 = !{!21}
-!21 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", scope: !0, file: !1, line: 4, type: !11, isLocal: false, isDefinition: true))
-!22 = !{i32 2, !"Dwarf Version", i32 2}
-!23 = !{i32 2, !"Debug Info Version", i32 3}
-!24 = !{i32 1, !"PIC Level", i32 2}
-!25 = !{!"clang version 3.9.0 (https://github.com/llvm-mirror/clang 8f258397c5afd7a708bd95770c718e81d08fb11a) (https://github.com/llvm-mirror/llvm 18481855bdfa1b4a424f81be8525db002671348d)"}
-!26 = !DIExpression()
-!27 = !DILocation(line: 5, column: 16, scope: !4)
-!28 = !DILocation(line: 6, column: 13, scope: !4)
-!29 = !DILocation(line: 6, column: 16, scope: !4)
-!30 = !DIExpression(DW_OP_LLVM_fragment, 0, 32)
-!31 = !DIExpression(DW_OP_LLVM_fragment, 32, 32)
-!32 = !DIExpression(DW_OP_LLVM_fragment, 32, 16)
-!33 = !DILocation(line: 8, column: 9, scope: !4)
-!34 = !DILocation(line: 9, column: 1, scope: !4)
-!35 = !DILocation(line: 11, column: 14, scope: !17)
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!12, !13, !14}
+!llvm.ident = !{!15}
+
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "a", scope: !2, file: !3, line: 4, type: !6, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 3.9.0 (https://github.com/llvm-mirror/clang 8f258397c5afd7a708bd95770c718e81d08fb11a) (https://github.com/llvm-mirror/llvm 18481855bdfa1b4a424f81be8525db002671348d)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
+!3 = !DIFile(filename: "small.c", directory: "/Users/kfischer/Projects/clangbug")
+!4 = !{}
+!5 = !{!0}
+!6 = !DICompositeType(tag: DW_TAG_structure_type, name: "S0", file: !3, line: 1, size: 64, align: 32, elements: !7)
+!7 = !{!8, !10}
+!8 = !DIDerivedType(tag: DW_TAG_member, name: "f0", scope: !6, file: !3, line: 2, baseType: !9, size: 16, align: 16)
+!9 = !DIBasicType(name: "short", size: 16, align: 16, encoding: DW_ATE_signed)
+!10 = !DIDerivedType(tag: DW_TAG_member, name: "f3", scope: !6, file: !3, line: 3, baseType: !11, size: 32, align: 32, offset: 32)
+!11 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!12 = !{i32 2, !"Dwarf Version", i32 2}
+!13 = !{i32 2, !"Debug Info Version", i32 3}
+!14 = !{i32 1, !"PIC Level", i32 2}
+!15 = !{!"clang version 3.9.0 (https://github.com/llvm-mirror/clang 8f258397c5afd7a708bd95770c718e81d08fb11a) (https://github.com/llvm-mirror/llvm 18481855bdfa1b4a424f81be8525db002671348d)"}
+!16 = distinct !DISubprogram(name: "fn1", scope: !3, file: !3, line: 5, type: !17, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: true, unit: !2, variables: !19)
+!17 = !DISubroutineType(types: !18)
+!18 = !{null, !9}
+!19 = !{!20, !21, !22}
+!20 = !DILocalVariable(name: "p1", arg: 1, scope: !16, file: !3, line: 5, type: !9)
+!21 = !DILocalVariable(name: "b", scope: !16, file: !3, line: 6, type: !6)
+!22 = !DILocalVariable(name: "c", scope: !16, file: !3, line: 6, type: !6)
+!23 = !DIExpression()
+!24 = !DILocation(line: 5, column: 16, scope: !16)
+!25 = !DILocation(line: 6, column: 13, scope: !16)
+!26 = !DILocation(line: 6, column: 16, scope: !16)
+!27 = !DIExpression(DW_OP_LLVM_fragment, 0, 32)
+!28 = !DIExpression(DW_OP_LLVM_fragment, 32, 32)
+!29 = !DIExpression(DW_OP_LLVM_fragment, 32, 16)
+!30 = !DILocation(line: 8, column: 9, scope: !16)
+!31 = !DILocation(line: 9, column: 1, scope: !16)
+!32 = distinct !DISubprogram(name: "main", scope: !3, file: !3, line: 11, type: !33, isLocal: false, isDefinition: true, scopeLine: 11, isOptimized: true, unit: !2, variables: !4)
+!33 = !DISubroutineType(types: !34)
+!34 = !{!11}
+!35 = !DILocation(line: 11, column: 14, scope: !32)
+
diff --git a/llvm/test/DebugInfo/X86/align_c11.ll b/llvm/test/DebugInfo/X86/align_c11.ll
index bfd04d1..c66a233 100644
--- a/llvm/test/DebugInfo/X86/align_c11.ll
+++ b/llvm/test/DebugInfo/X86/align_c11.ll
@@ -52,32 +52,33 @@
attributes #0 = { nounwind uwtable }
attributes #1 = { nounwind readnone }
-!llvm.dbg.cu = !{!1}
+!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!14, !15}
!llvm.ident = !{!16}
-!0 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "d", scope: !1, file: !5, line: 7, type: !6, isLocal: false, isDefinition: true, align: 16384))
-!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 4.0.0 (http://llvm.org/git/clang.git 9ce5220b821054019059c2ac4a9b132c7723832d) (http://llvm.org/git/llvm.git 9a6298be89ce0359b151c0a37af2776a12c69e85)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, globals: !4)
-!2 = !DIFile(filename: "test.c", directory: "/tmp")
-!3 = !{}
-!4 = !{!0}
-!5 = !DIFile(filename: "test.c", directory: "/tmp")
-!6 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "data", file: !5, line: 2, size: 2048, elements: !7)
+!0 = distinct !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "d", scope: !2, file: !3, line: 7, type: !6, isLocal: false, isDefinition: true, align: 16384)
+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 4.0.0 (http://llvm.org/git/clang.git 9ce5220b821054019059c2ac4a9b132c7723832d) (http://llvm.org/git/llvm.git 9a6298be89ce0359b151c0a37af2776a12c69e85)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
+!3 = !DIFile(filename: "test.c", directory: "/tmp")
+!4 = !{}
+!5 = !{!0}
+!6 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "data", file: !3, line: 2, size: 2048, elements: !7)
!7 = !{!8, !10}
-!8 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !6, file: !5, line: 3, baseType: !9, size: 8)
+!8 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !6, file: !3, line: 3, baseType: !9, size: 8)
!9 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
-!10 = !DIDerivedType(tag: DW_TAG_member, name: "arr", scope: !6, file: !5, line: 4, baseType: !11, size: 16, align: 1024, offset: 1024)
+!10 = !DIDerivedType(tag: DW_TAG_member, name: "arr", scope: !6, file: !3, line: 4, baseType: !11, size: 16, align: 1024, offset: 1024)
!11 = !DICompositeType(tag: DW_TAG_array_type, baseType: !9, size: 16, elements: !12)
!12 = !{!13}
!13 = !DISubrange(count: 2)
!14 = !{i32 2, !"Dwarf Version", i32 4}
!15 = !{i32 2, !"Debug Info Version", i32 3}
!16 = !{!"clang version 4.0.0 (http://llvm.org/git/clang.git 9ce5220b821054019059c2ac4a9b132c7723832d) (http://llvm.org/git/llvm.git 9a6298be89ce0359b151c0a37af2776a12c69e85)"}
-!17 = distinct !DISubprogram(name: "foo", scope: !5, file: !5, line: 8, type: !18, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: false, unit: !1, variables: !3)
+!17 = distinct !DISubprogram(name: "foo", scope: !3, file: !3, line: 8, type: !18, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: false, unit: !2, variables: !4)
!18 = !DISubroutineType(types: !19)
!19 = !{!20}
!20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-!21 = !DILocalVariable(name: "local_data", scope: !17, file: !5, line: 10, type: !6)
+!21 = !DILocalVariable(name: "local_data", scope: !17, file: !3, line: 10, type: !6)
!22 = !DIExpression()
!23 = !DILocation(line: 10, column: 17, scope: !17)
!24 = !DILocation(line: 11, column: 5, scope: !17)
+
diff --git a/llvm/test/DebugInfo/X86/align_cpp11.ll b/llvm/test/DebugInfo/X86/align_cpp11.ll
index 15dd6a6..2b3b68e 100644
--- a/llvm/test/DebugInfo/X86/align_cpp11.ll
+++ b/llvm/test/DebugInfo/X86/align_cpp11.ll
@@ -86,26 +86,26 @@
%class.anon = type { i32 }
@c0 = global %class.C0 zeroinitializer, align 64, !dbg !0
-@s = global %struct.S zeroinitializer, align 2048, !dbg !11
+@s = global %struct.S zeroinitializer, align 2048, !dbg !12
; Function Attrs: nounwind uwtable
-define void @_Z3foov() #0 !dbg !22 {
+define void @_Z3foov() #0 !dbg !24 {
entry:
%ss = alloca %struct.S, align 128
%e = alloca i32, align 16
%c1 = alloca %class.C1, align 1
%i = alloca i32, align 32
%Lambda = alloca %class.anon, align 4
- call void @llvm.dbg.declare(metadata %struct.S* %ss, metadata !25, metadata !26), !dbg !27
- call void @llvm.dbg.declare(metadata i32* %e, metadata !28, metadata !26), !dbg !29
- call void @llvm.dbg.declare(metadata %class.C1* %c1, metadata !30, metadata !26), !dbg !35
- call void @llvm.dbg.declare(metadata i32* %i, metadata !36, metadata !26), !dbg !38
- store i32 42, i32* %i, align 32, !dbg !38
- call void @llvm.dbg.declare(metadata %class.anon* %Lambda, metadata !39, metadata !26), !dbg !48
- %0 = getelementptr inbounds %class.anon, %class.anon* %Lambda, i32 0, i32 0, !dbg !49
- %1 = load i32, i32* %i, align 32, !dbg !50
- store i32 %1, i32* %0, align 4, !dbg !49
- ret void, !dbg !51
+ call void @llvm.dbg.declare(metadata %struct.S* %ss, metadata !27, metadata !28), !dbg !29
+ call void @llvm.dbg.declare(metadata i32* %e, metadata !30, metadata !28), !dbg !31
+ call void @llvm.dbg.declare(metadata %class.C1* %c1, metadata !32, metadata !28), !dbg !37
+ call void @llvm.dbg.declare(metadata i32* %i, metadata !38, metadata !28), !dbg !40
+ store i32 42, i32* %i, align 32, !dbg !40
+ call void @llvm.dbg.declare(metadata %class.anon* %Lambda, metadata !41, metadata !28), !dbg !50
+ %0 = getelementptr inbounds %class.anon, %class.anon* %Lambda, i32 0, i32 0, !dbg !51
+ %1 = load i32, i32* %i, align 32, !dbg !52
+ store i32 %1, i32* %0, align 4, !dbg !51
+ ret void, !dbg !53
}
; Function Attrs: nounwind readnone
@@ -114,59 +114,62 @@
attributes #0 = { nounwind uwtable }
attributes #1 = { nounwind readnone }
-!llvm.dbg.cu = !{!1}
-!llvm.module.flags = !{!19, !20}
-!llvm.ident = !{!21}
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!21, !22}
+!llvm.ident = !{!23}
-!0 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "c0", scope: !1, file: !5, line: 19, type: !17, isLocal: false, isDefinition: true))
-!1 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 4.0.0 (http://llvm.org/git/clang.git 9ce5220b821054019059c2ac4a9b132c7723832d) (http://llvm.org/git/llvm.git 9a6298be89ce0359b151c0a37af2776a12c69e85)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, globals: !10)
-!2 = !DIFile(filename: "test.cpp", directory: "/tmp")
-!3 = !{!4}
-!4 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E", file: !5, line: 13, size: 32, align: 128, elements: !6, identifier: "_ZTS1E")
-!5 = !DIFile(filename: "./test.cpp", directory: "/tmp")
-!6 = !{!7, !8, !9}
-!7 = !DIEnumerator(name: "A", value: 0)
-!8 = !DIEnumerator(name: "B", value: 1)
-!9 = !DIEnumerator(name: "C", value: 2)
-!10 = !{!0, !11}
-!11 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "s", scope: !1, file: !5, line: 21, type: !12, isLocal: false, isDefinition: true, align: 16384))
-!12 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "S", file: !5, line: 1, size: 2048, elements: !13, identifier: "_ZTS1S")
-!13 = !{!14, !16}
-!14 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !12, file: !5, line: 2, baseType: !15, size: 8)
-!15 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
-!16 = !DIDerivedType(tag: DW_TAG_member, name: "xx", scope: !12, file: !5, line: 3, baseType: !15, size: 8, align: 1024, offset: 1024)
-!17 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "C0", file: !5, line: 6, size: 512, align: 512, elements: !18, identifier: "_ZTS2C0")
-!18 = !{}
-!19 = !{i32 2, !"Dwarf Version", i32 4}
-!20 = !{i32 2, !"Debug Info Version", i32 3}
-!21 = !{!"clang version 4.0.0 (http://llvm.org/git/clang.git 9ce5220b821054019059c2ac4a9b132c7723832d) (http://llvm.org/git/llvm.git 9a6298be89ce0359b151c0a37af2776a12c69e85)"}
-!22 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !5, file: !5, line: 23, type: !23, isLocal: false, isDefinition: true, scopeLine: 24, flags: DIFlagPrototyped, isOptimized: false, unit: !1, variables: !18)
-!23 = !DISubroutineType(types: !24)
-!24 = !{null}
-!25 = !DILocalVariable(name: "ss", scope: !22, file: !5, line: 25, type: !12)
-!26 = !DIExpression()
-!27 = !DILocation(line: 25, column: 7, scope: !22)
-!28 = !DILocalVariable(name: "e", scope: !22, file: !5, line: 26, type: !4)
-!29 = !DILocation(line: 26, column: 7, scope: !22)
-!30 = !DILocalVariable(name: "c1", scope: !22, file: !5, line: 27, type: !31)
-!31 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "C1", file: !5, line: 9, size: 8, elements: !32, identifier: "_ZTS2C1")
-!32 = !{!33}
-!33 = !DIDerivedType(tag: DW_TAG_member, name: "p", scope: !31, file: !5, line: 10, baseType: !34, align: 512, flags: DIFlagStaticMember)
-!34 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
-!35 = !DILocation(line: 27, column: 8, scope: !22)
-!36 = !DILocalVariable(name: "i", scope: !22, file: !5, line: 28, type: !37, align: 256)
-!37 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-!38 = !DILocation(line: 28, column: 21, scope: !22)
-!39 = !DILocalVariable(name: "Lambda", scope: !22, file: !5, line: 29, type: !40)
-!40 = distinct !DICompositeType(tag: DW_TAG_class_type, scope: !22, file: !5, line: 29, size: 32, elements: !41)
-!41 = !{!42, !43}
-!42 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !40, file: !5, line: 29, baseType: !37, size: 32, align: 256)
-!43 = !DISubprogram(name: "operator()", scope: !40, file: !5, line: 29, type: !44, isLocal: false, isDefinition: false, scopeLine: 29, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false)
-!44 = !DISubroutineType(types: !45)
-!45 = !{null, !46}
-!46 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !47, size: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
-!47 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !40)
-!48 = !DILocation(line: 29, column: 10, scope: !22)
-!49 = !DILocation(line: 29, column: 19, scope: !22)
-!50 = !DILocation(line: 29, column: 20, scope: !22)
-!51 = !DILocation(line: 30, column: 1, scope: !22)
+!0 = distinct !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "c0", scope: !2, file: !6, line: 19, type: !19, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 4.0.0 (http://llvm.org/git/clang.git 9ce5220b821054019059c2ac4a9b132c7723832d) (http://llvm.org/git/llvm.git 9a6298be89ce0359b151c0a37af2776a12c69e85)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !11)
+!3 = !DIFile(filename: "test.cpp", directory: "/tmp")
+!4 = !{!5}
+!5 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E", file: !6, line: 13, size: 32, align: 128, elements: !7, identifier: "_ZTS1E")
+!6 = !DIFile(filename: "./test.cpp", directory: "/tmp")
+!7 = !{!8, !9, !10}
+!8 = !DIEnumerator(name: "A", value: 0)
+!9 = !DIEnumerator(name: "B", value: 1)
+!10 = !DIEnumerator(name: "C", value: 2)
+!11 = !{!0, !12}
+!12 = distinct !DIGlobalVariableExpression(var: !13)
+!13 = !DIGlobalVariable(name: "s", scope: !2, file: !6, line: 21, type: !14, isLocal: false, isDefinition: true, align: 16384)
+!14 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "S", file: !6, line: 1, size: 2048, elements: !15, identifier: "_ZTS1S")
+!15 = !{!16, !18}
+!16 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !14, file: !6, line: 2, baseType: !17, size: 8)
+!17 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
+!18 = !DIDerivedType(tag: DW_TAG_member, name: "xx", scope: !14, file: !6, line: 3, baseType: !17, size: 8, align: 1024, offset: 1024)
+!19 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "C0", file: !6, line: 6, size: 512, align: 512, elements: !20, identifier: "_ZTS2C0")
+!20 = !{}
+!21 = !{i32 2, !"Dwarf Version", i32 4}
+!22 = !{i32 2, !"Debug Info Version", i32 3}
+!23 = !{!"clang version 4.0.0 (http://llvm.org/git/clang.git 9ce5220b821054019059c2ac4a9b132c7723832d) (http://llvm.org/git/llvm.git 9a6298be89ce0359b151c0a37af2776a12c69e85)"}
+!24 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !6, file: !6, line: 23, type: !25, isLocal: false, isDefinition: true, scopeLine: 24, flags: DIFlagPrototyped, isOptimized: false, unit: !2, variables: !20)
+!25 = !DISubroutineType(types: !26)
+!26 = !{null}
+!27 = !DILocalVariable(name: "ss", scope: !24, file: !6, line: 25, type: !14)
+!28 = !DIExpression()
+!29 = !DILocation(line: 25, column: 7, scope: !24)
+!30 = !DILocalVariable(name: "e", scope: !24, file: !6, line: 26, type: !5)
+!31 = !DILocation(line: 26, column: 7, scope: !24)
+!32 = !DILocalVariable(name: "c1", scope: !24, file: !6, line: 27, type: !33)
+!33 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "C1", file: !6, line: 9, size: 8, elements: !34, identifier: "_ZTS2C1")
+!34 = !{!35}
+!35 = !DIDerivedType(tag: DW_TAG_member, name: "p", scope: !33, file: !6, line: 10, baseType: !36, align: 512, flags: DIFlagStaticMember)
+!36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
+!37 = !DILocation(line: 27, column: 8, scope: !24)
+!38 = !DILocalVariable(name: "i", scope: !24, file: !6, line: 28, type: !39, align: 256)
+!39 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+!40 = !DILocation(line: 28, column: 21, scope: !24)
+!41 = !DILocalVariable(name: "Lambda", scope: !24, file: !6, line: 29, type: !42)
+!42 = distinct !DICompositeType(tag: DW_TAG_class_type, scope: !24, file: !6, line: 29, size: 32, elements: !43)
+!43 = !{!44, !45}
+!44 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !42, file: !6, line: 29, baseType: !39, size: 32, align: 256)
+!45 = !DISubprogram(name: "operator()", scope: !42, file: !6, line: 29, type: !46, isLocal: false, isDefinition: false, scopeLine: 29, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false)
+!46 = !DISubroutineType(types: !47)
+!47 = !{null, !48}
+!48 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !49, size: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!49 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !42)
+!50 = !DILocation(line: 29, column: 10, scope: !24)
+!51 = !DILocation(line: 29, column: 19, scope: !24)
+!52 = !DILocation(line: 29, column: 20, scope: !24)
+!53 = !DILocation(line: 30, column: 1, scope: !24)
+
diff --git a/llvm/test/DebugInfo/X86/align_objc.ll b/llvm/test/DebugInfo/X86/align_objc.ll
index 5c89d60..02cfcac 100644
--- a/llvm/test/DebugInfo/X86/align_objc.ll
+++ b/llvm/test/DebugInfo/X86/align_objc.ll
@@ -64,35 +64,36 @@
attributes #0 = { nounwind uwtable }
attributes #1 = { nounwind readnone }
-!llvm.dbg.cu = !{!1}
+!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!11, !12}
!llvm.ident = !{!13}
-!0 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "s0", scope: !1, file: !5, line: 10, type: !6, isLocal: false, isDefinition: true))
-!1 = distinct !DICompileUnit(language: DW_LANG_ObjC, file: !2, producer: "clang version 4.0.0 (http://llvm.org/git/clang.git 9ce5220b821054019059c2ac4a9b132c7723832d) (http://llvm.org/git/llvm.git 9a6298be89ce0359b151c0a37af2776a12c69e85)", isOptimized: false, runtimeVersion: 1, emissionKind: FullDebug, enums: !3, globals: !4)
-!2 = !DIFile(filename: "test.m", directory: "/tmp")
-!3 = !{}
-!4 = !{!0}
-!5 = !DIFile(filename: "test.m", directory: "/tmp")
-!6 = !DIDerivedType(tag: DW_TAG_typedef, name: "S0", file: !5, line: 3, baseType: !7)
-!7 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !5, line: 1, size: 1024, align: 1024, elements: !8)
+!0 = distinct !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "s0", scope: !2, file: !3, line: 10, type: !6, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_ObjC, file: !3, producer: "clang version 4.0.0 (http://llvm.org/git/clang.git 9ce5220b821054019059c2ac4a9b132c7723832d) (http://llvm.org/git/llvm.git 9a6298be89ce0359b151c0a37af2776a12c69e85)", isOptimized: false, runtimeVersion: 1, emissionKind: FullDebug, enums: !4, globals: !5)
+!3 = !DIFile(filename: "test.m", directory: "/tmp")
+!4 = !{}
+!5 = !{!0}
+!6 = !DIDerivedType(tag: DW_TAG_typedef, name: "S0", file: !3, line: 3, baseType: !7)
+!7 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !3, line: 1, size: 1024, align: 1024, elements: !8)
!8 = !{!9}
-!9 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !7, file: !5, line: 2, baseType: !10, size: 8)
+!9 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !7, file: !3, line: 2, baseType: !10, size: 8)
!10 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
!11 = !{i32 2, !"Dwarf Version", i32 4}
!12 = !{i32 2, !"Debug Info Version", i32 3}
!13 = !{!"clang version 4.0.0 (http://llvm.org/git/clang.git 9ce5220b821054019059c2ac4a9b132c7723832d) (http://llvm.org/git/llvm.git 9a6298be89ce0359b151c0a37af2776a12c69e85)"}
-!14 = distinct !DISubprogram(name: "f", scope: !5, file: !5, line: 12, type: !15, isLocal: false, isDefinition: true, scopeLine: 12, isOptimized: false, unit: !1, variables: !3)
+!14 = distinct !DISubprogram(name: "f", scope: !3, file: !3, line: 12, type: !15, isLocal: false, isDefinition: true, scopeLine: 12, isOptimized: false, unit: !2, variables: !4)
!15 = !DISubroutineType(types: !16)
!16 = !{null}
-!17 = !DILocalVariable(name: "s1", scope: !14, file: !5, line: 13, type: !18)
-!18 = !DIDerivedType(tag: DW_TAG_typedef, name: "S1", file: !5, line: 8, baseType: !19)
-!19 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !5, line: 6, size: 512, elements: !20)
+!17 = !DILocalVariable(name: "s1", scope: !14, file: !3, line: 13, type: !18)
+!18 = !DIDerivedType(tag: DW_TAG_typedef, name: "S1", file: !3, line: 8, baseType: !19)
+!19 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !3, line: 6, size: 512, elements: !20)
!20 = !{!21}
-!21 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !19, file: !5, line: 7, baseType: !10, size: 8, align: 512)
+!21 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !19, file: !3, line: 7, baseType: !10, size: 8, align: 512)
!22 = !DIExpression()
!23 = !DILocation(line: 13, column: 6, scope: !14)
-!24 = !DILocalVariable(name: "i", scope: !14, file: !5, line: 14, type: !25, align: 256)
+!24 = !DILocalVariable(name: "i", scope: !14, file: !3, line: 14, type: !25, align: 256)
!25 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!26 = !DILocation(line: 14, column: 37, scope: !14)
!27 = !DILocation(line: 15, column: 1, scope: !14)
+
diff --git a/llvm/test/DebugInfo/X86/arange-and-stub.ll b/llvm/test/DebugInfo/X86/arange-and-stub.ll
index 0601e81..b589246 100644
--- a/llvm/test/DebugInfo/X86/arange-and-stub.ll
+++ b/llvm/test/DebugInfo/X86/arange-and-stub.ll
@@ -7,16 +7,17 @@
; CHECK: .data
; CHECK-NEXT: .Lsec_end0:
+source_filename = "test/DebugInfo/X86/arange-and-stub.ll"
target triple = "x86_64-linux-gnu"
@_ZTId = external constant i8*
-@zed = global [1 x void ()*] [void ()* @bar], !dbg !11
+@zed = global [1 x void ()*] [void ()* @bar], !dbg !0
-define void @foo() !dbg !4 {
+define void @foo() !dbg !17 {
ret void
}
-define void @bar() personality i8* bitcast (void ()* @foo to i8*) !dbg !9 {
+define void @bar() personality i8* bitcast (void ()* @foo to i8*) !dbg !18 {
invoke void @foo()
to label %invoke.cont unwind label %lpad, !dbg !19
@@ -29,25 +30,27 @@
ret void
}
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!17, !18}
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!15, !16}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.7.0 (trunk 234308) (llvm/trunk 234310)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !10, imports: !2)
-!1 = !DIFile(filename: "/Users/espindola/llvm/<stdin>", directory: "/Users/espindola/llvm/build")
-!2 = !{}
-!4 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: !5, file: !5, line: 1, type: !6, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
-!5 = !DIFile(filename: "/Users/espindola/llvm/test.cpp", directory: "/Users/espindola/llvm/build")
-!6 = !DISubroutineType(types: !7)
-!7 = !{null, !8}
-!8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!9 = distinct !DISubprogram(name: "bar_d", linkageName: "bar", scope: !5, file: !5, line: 3, type: !6, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
-!10 = !{!11}
-!11 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "zed", scope: !0, file: !5, line: 6, type: !12, isLocal: false, isDefinition: true))
-!12 = !DICompositeType(tag: DW_TAG_array_type, baseType: !13, size: 64, align: 64, elements: !15)
-!13 = !DIDerivedType(tag: DW_TAG_typedef, name: "vifunc", file: !5, line: 5, baseType: !14)
-!14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 64, align: 64)
-!15 = !{!16}
-!16 = !DISubrange(count: 1)
-!17 = !{i32 2, !"Dwarf Version", i32 4}
-!18 = !{i32 2, !"Debug Info Version", i32 3}
-!19 = !DILocation(line: 0, scope: !9)
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "zed", scope: !2, file: !6, line: 6, type: !7, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 3.7.0 (trunk 234308) (llvm/trunk 234310)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !4, globals: !5, imports: !4)
+!3 = !DIFile(filename: "/Users/espindola/llvm/<stdin>", directory: "/Users/espindola/llvm/build")
+!4 = !{}
+!5 = !{!0}
+!6 = !DIFile(filename: "/Users/espindola/llvm/test.cpp", directory: "/Users/espindola/llvm/build")
+!7 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 64, align: 64, elements: !13)
+!8 = !DIDerivedType(tag: DW_TAG_typedef, name: "vifunc", file: !6, line: 5, baseType: !9)
+!9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10, size: 64, align: 64)
+!10 = !DISubroutineType(types: !11)
+!11 = !{null, !12}
+!12 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!13 = !{!14}
+!14 = !DISubrange(count: 1)
+!15 = !{i32 2, !"Dwarf Version", i32 4}
+!16 = !{i32 2, !"Debug Info Version", i32 3}
+!17 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: !6, file: !6, line: 1, type: !10, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !2, variables: !4)
+!18 = distinct !DISubprogram(name: "bar_d", linkageName: "bar", scope: !6, file: !6, line: 3, type: !10, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !2, variables: !4)
+!19 = !DILocation(line: 0, scope: !18)
+
diff --git a/llvm/test/DebugInfo/X86/arange.ll b/llvm/test/DebugInfo/X86/arange.ll
index a01a918..dca0d06 100644
--- a/llvm/test/DebugInfo/X86/arange.ll
+++ b/llvm/test/DebugInfo/X86/arange.ll
@@ -20,27 +20,30 @@
; OBJ: debug_aranges
; OBJ-NEXT: R_X86_64_32 .debug_info 0x0
+source_filename = "test/DebugInfo/X86/arange.ll"
+
%struct.foo = type { i8 }
-@f = global %struct.foo zeroinitializer, align 1, !dbg !10
+@f = global %struct.foo zeroinitializer, align 1, !dbg !0
@i = external global i32
-!llvm.dbg.cu = !{!0}
+!llvm.dbg.cu = !{!9}
!llvm.module.flags = !{!12, !13}
!llvm.ident = !{!14}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !9, imports: !2)
-!1 = !DIFile(filename: "simple.cpp", directory: "/tmp/dbginfo")
-!2 = !{}
-!3 = !{!4}
-!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo<&i>", line: 3, size: 8, align: 8, file: !1, elements: !2, templateParams: !5, identifier: "_ZTS3fooIXadL_Z1iEEE")
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "f", scope: null, file: !2, line: 6, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "simple.cpp", directory: "/tmp/dbginfo")
+!3 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo<&i>", file: !2, line: 3, size: 8, align: 8, elements: !4, templateParams: !5, identifier: "_ZTS3fooIXadL_Z1iEEE")
+!4 = !{}
!5 = !{!6}
-!6 = !DITemplateValueParameter(tag: DW_TAG_template_value_parameter, name: "x", type: !7, value: i32* @i)
-!7 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !8)
-!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!9 = !{!10}
-!10 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "f", line: 6, isLocal: false, isDefinition: true, scope: null, file: !11, type: !4))
-!11 = !DIFile(filename: "simple.cpp", directory: "/tmp/dbginfo")
+!6 = !DITemplateValueParameter(name: "x", type: !7, value: i32* @i)
+!7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !8, size: 64, align: 64)
+!8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.5 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !10, globals: !11, imports: !4)
+!10 = !{!3}
+!11 = !{!0}
!12 = !{i32 2, !"Dwarf Version", i32 4}
!13 = !{i32 1, !"Debug Info Version", i32 3}
!14 = !{!"clang version 3.5 "}
+
diff --git a/llvm/test/DebugInfo/X86/atomic-c11-dwarf-4.ll b/llvm/test/DebugInfo/X86/atomic-c11-dwarf-4.ll
index ba38ca8..1d523c9 100644
--- a/llvm/test/DebugInfo/X86/atomic-c11-dwarf-4.ll
+++ b/llvm/test/DebugInfo/X86/atomic-c11-dwarf-4.ll
@@ -18,19 +18,20 @@
@i = common global i32 0, align 4, !dbg !0
-!llvm.dbg.cu = !{!1}
+!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!9, !10}
!llvm.ident = !{!11}
-!0 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "i", scope: !1, file: !5, line: 1, type: !6, isLocal: false, isDefinition: true))
-!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 4.0.0 (http://llvm.org/git/clang.git cd238117e3a8a57271a82d0bb03d6df6ad8f073e) (http://llvm.org/git/llvm.git 9fd063832c1541aad3907cd60ac344d36997905f)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, globals: !4)
-!2 = !DIFile(filename: "atomic.c", directory: "/tmp")
-!3 = !{}
-!4 = !{!0}
-!5 = !DIFile(filename: "atomic.c", directory: "/tmp")
+!0 = distinct !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "i", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 4.0.0 (http://llvm.org/git/clang.git cd238117e3a8a57271a82d0bb03d6df6ad8f073e) (http://llvm.org/git/llvm.git 9fd063832c1541aad3907cd60ac344d36997905f)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
+!3 = !DIFile(filename: "atomic.c", directory: "/tmp")
+!4 = !{}
+!5 = !{!0}
!6 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !7)
!7 = !DIDerivedType(tag: DW_TAG_atomic_type, baseType: !8)
!8 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!9 = !{i32 2, !"Dwarf Version", i32 4}
!10 = !{i32 2, !"Debug Info Version", i32 3}
!11 = !{!"clang version 4.0.0 (http://llvm.org/git/clang.git cd238117e3a8a57271a82d0bb03d6df6ad8f073e) (http://llvm.org/git/llvm.git 9fd063832c1541aad3907cd60ac344d36997905f)"}
+
diff --git a/llvm/test/DebugInfo/X86/atomic-c11-dwarf-5.ll b/llvm/test/DebugInfo/X86/atomic-c11-dwarf-5.ll
index 9a9fa92..63c4e38 100644
--- a/llvm/test/DebugInfo/X86/atomic-c11-dwarf-5.ll
+++ b/llvm/test/DebugInfo/X86/atomic-c11-dwarf-5.ll
@@ -19,19 +19,20 @@
@i = common global i32 0, align 4, !dbg !0
-!llvm.dbg.cu = !{!1}
+!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!9, !10}
!llvm.ident = !{!11}
-!0 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "i", scope: !1, file: !5, line: 1, type: !6, isLocal: false, isDefinition: true))
-!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 4.0.0 (http://llvm.org/git/clang.git cd238117e3a8a57271a82d0bb03d6df6ad8f073e) (http://llvm.org/git/llvm.git 9fd063832c1541aad3907cd60ac344d36997905f)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, globals: !4)
-!2 = !DIFile(filename: "atomic.c", directory: "/tmp")
-!3 = !{}
-!4 = !{!0}
-!5 = !DIFile(filename: "atomic.c", directory: "/tmp")
+!0 = distinct !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "i", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 4.0.0 (http://llvm.org/git/clang.git cd238117e3a8a57271a82d0bb03d6df6ad8f073e) (http://llvm.org/git/llvm.git 9fd063832c1541aad3907cd60ac344d36997905f)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
+!3 = !DIFile(filename: "atomic.c", directory: "/tmp")
+!4 = !{}
+!5 = !{!0}
!6 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !7)
!7 = !DIDerivedType(tag: DW_TAG_atomic_type, baseType: !8)
!8 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!9 = !{i32 2, !"Dwarf Version", i32 5}
!10 = !{i32 2, !"Debug Info Version", i32 3}
!11 = !{!"clang version 4.0.0 (http://llvm.org/git/clang.git cd238117e3a8a57271a82d0bb03d6df6ad8f073e) (http://llvm.org/git/llvm.git 9fd063832c1541aad3907cd60ac344d36997905f)"}
+
diff --git a/llvm/test/DebugInfo/X86/bitfields-dwarf4.ll b/llvm/test/DebugInfo/X86/bitfields-dwarf4.ll
index d072fda..6cacdd6 100644
--- a/llvm/test/DebugInfo/X86/bitfields-dwarf4.ll
+++ b/llvm/test/DebugInfo/X86/bitfields-dwarf4.ll
@@ -21,30 +21,32 @@
%struct.PackedBits = type <{ i8, i32 }>
-@s = common global %struct.PackedBits zeroinitializer, align 1, !dbg !4
+@s = common global %struct.PackedBits zeroinitializer, align 1, !dbg !0
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!14, !15, !16}
-!llvm.ident = !{!17}
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!15, !16, !17}
+!llvm.ident = !{!18}
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 267633)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !3)
-!1 = !DIFile(filename: "bitfield.c", directory: "/Volumes/Data/llvm")
-!2 = !{}
-!3 = !{!4}
-!4 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "s", scope: !0, file: !1, line: 8, type: !5, isLocal: false, isDefinition: true))
-!5 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "PackedBits", file: !1, line: 3, size: 40, elements: !6)
-!6 = !{!7, !9, !13}
-
+!0 = distinct !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "s", scope: !2, file: !3, line: 8, type: !6, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 3.9.0 (trunk 267633)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
+!3 = !DIFile(filename: "bitfield.c", directory: "/Volumes/Data/llvm")
+!4 = !{}
+!5 = !{!0}
+!6 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "PackedBits", file: !3, line: 3, size: 40, elements: !7)
+!7 = !{!8, !10, !14}
+!8 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !6, file: !3, line: 5, baseType: !9, size: 8)
; CHECK: DW_TAG_member
; CHECK-NEXT: DW_AT_name{{.*}}"a"
; CHECK-NOT: DW_TAG
; CHECK-NOT: DW_AT_bit_offset
; CHECK-NOT: DW_AT_data_bit_offset
; CHECK: DW_AT_data_member_location [DW_FORM_data1] (0x00)
-!7 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !5, file: !1, line: 5, baseType: !8, size: 8)
-
-!8 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
-
+!9 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
+!10 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !6, file: !3, line: 6, baseType: !11, size: 5, offset: 8)
+!11 = !DIDerivedType(tag: DW_TAG_typedef, name: "uint32_t", file: !12, line: 183, baseType: !13)
+!12 = !DIFile(filename: "/Volumes/Data/llvm/_build.ninja.release/bin/../lib/clang/3.9.0/include/stdint.h", directory: "/Volumes/Data/llvm")
+!13 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
; CHECK: DW_TAG_member
; CHECK-NEXT: DW_AT_name{{.*}}"b"
; CHECK-NOT: DW_TAG
@@ -54,12 +56,10 @@
; CHECK-NOT: DW_AT_byte_size
; CHECK-NEXT: DW_AT_data_bit_offset [DW_FORM_data1] (0x08)
; CHECK-NOT: DW_AT_data_member_location
-!9 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !5, file: !1, line: 6, baseType: !10, size: 5, offset: 8)
-
-!10 = !DIDerivedType(tag: DW_TAG_typedef, name: "uint32_t", file: !11, line: 183, baseType: !12)
-!11 = !DIFile(filename: "/Volumes/Data/llvm/_build.ninja.release/bin/../lib/clang/3.9.0/include/stdint.h", directory: "/Volumes/Data/llvm")
-!12 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
-
+!14 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !6, file: !3, line: 7, baseType: !11, size: 27, offset: 13)
+!15 = !{i32 2, !"Dwarf Version", i32 4}
+!16 = !{i32 2, !"Debug Info Version", i32 3}
+!17 = !{i32 1, !"PIC Level", i32 2}
; CHECK: DW_TAG_member
; CHECK-NEXT: DW_AT_name{{.*}}"c"
; CHECK-NOT: DW_TAG
@@ -69,9 +69,5 @@
; CHECK-NEXT: DW_AT_data_bit_offset [DW_FORM_data1] (0x0d)
; CHECK-NOT: DW_AT_data_member_location
; CHECK: DW_TAG
-!13 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !5, file: !1, line: 7, baseType: !10, size: 27, offset: 13)
+!18 = !{!"clang version 3.9.0 (trunk 267633)"}
-!14 = !{i32 2, !"Dwarf Version", i32 4}
-!15 = !{i32 2, !"Debug Info Version", i32 3}
-!16 = !{i32 1, !"PIC Level", i32 2}
-!17 = !{!"clang version 3.9.0 (trunk 267633)"}
diff --git a/llvm/test/DebugInfo/X86/bitfields.ll b/llvm/test/DebugInfo/X86/bitfields.ll
index 7f6b709..9b327ac 100644
--- a/llvm/test/DebugInfo/X86/bitfields.ll
+++ b/llvm/test/DebugInfo/X86/bitfields.ll
@@ -43,31 +43,33 @@
; CHECK-NEXT: DW_AT_data_member_location {{.*}} 08
; ModuleID = 'bitfields.c'
+source_filename = "test/DebugInfo/X86/bitfields.ll"
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx"
%struct.bitfield = type <{ i8, [3 x i8], i64 }>
-@b = common global %struct.bitfield zeroinitializer, align 4, !dbg !4
+@b = common global %struct.bitfield zeroinitializer, align 4, !dbg !0
-!llvm.dbg.cu = !{!0}
+!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!13, !14, !15}
!llvm.ident = !{!16}
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 240548) (llvm/trunk 240554)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3, imports: !2)
-!1 = !DIFile(filename: "bitfields.c", directory: "/")
-!2 = !{}
-!3 = !{!4}
-!4 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "b", scope: !0, file: !5, line: 8, type: !6, isLocal: false, isDefinition: true))
-!5 = !DIFile(filename: "bitfields.c", directory: "/")
-!6 = !DICompositeType(tag: DW_TAG_structure_type, name: "bitfield", file: !5, line: 1, size: 96, elements: !7)
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "b", scope: !2, file: !3, line: 8, type: !6, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 3.7.0 (trunk 240548) (llvm/trunk 240554)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !4, globals: !5, imports: !4)
+!3 = !DIFile(filename: "bitfields.c", directory: "/")
+!4 = !{}
+!5 = !{!0}
+!6 = !DICompositeType(tag: DW_TAG_structure_type, name: "bitfield", file: !3, line: 1, size: 96, elements: !7)
!7 = !{!8, !10, !11, !12}
-!8 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !6, file: !5, line: 2, baseType: !9, size: 2)
+!8 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !6, file: !3, line: 2, baseType: !9, size: 2)
!9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-!10 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !6, file: !5, line: 3, baseType: !9, size: 32, offset: 32)
-!11 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !6, file: !5, line: 4, baseType: !9, size: 1, offset: 64)
-!12 = !DIDerivedType(tag: DW_TAG_member, name: "d", scope: !6, file: !5, line: 5, baseType: !9, size: 28, offset: 65)
+!10 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !6, file: !3, line: 3, baseType: !9, size: 32, offset: 32)
+!11 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !6, file: !3, line: 4, baseType: !9, size: 1, offset: 64)
+!12 = !DIDerivedType(tag: DW_TAG_member, name: "d", scope: !6, file: !3, line: 5, baseType: !9, size: 28, offset: 65)
!13 = !{i32 2, !"Dwarf Version", i32 2}
!14 = !{i32 2, !"Debug Info Version", i32 3}
!15 = !{i32 1, !"PIC Level", i32 2}
!16 = !{!"clang version 3.7.0 (trunk 240548) (llvm/trunk 240554)"}
+
diff --git a/llvm/test/DebugInfo/X86/c-type-units.ll b/llvm/test/DebugInfo/X86/c-type-units.ll
index c60f325..d31a6ff 100644
--- a/llvm/test/DebugInfo/X86/c-type-units.ll
+++ b/llvm/test/DebugInfo/X86/c-type-units.ll
@@ -9,21 +9,24 @@
; so we don't produce type units for them
; CHECK-NOT: DW_TAG_type_unit
+source_filename = "test/DebugInfo/X86/c-type-units.ll"
+
%struct.foo = type {}
-@f = common global %struct.foo zeroinitializer, align 1, !dbg !4
+@f = common global %struct.foo zeroinitializer, align 1, !dbg !0
-!llvm.dbg.cu = !{!0}
+!llvm.dbg.cu = !{!5}
!llvm.module.flags = !{!7, !8}
!llvm.ident = !{!9}
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !3, imports: !2)
-!1 = !DIFile(filename: "simple.c", directory: "/tmp/dbginfo")
-!2 = !{}
-!3 = !{!4}
-!4 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "f", line: 2, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6))
-!5 = !DIFile(filename: "simple.c", directory: "/tmp/dbginfo")
-!6 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", line: 1, align: 8, file: !1, elements: !2)
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "f", scope: null, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "simple.c", directory: "/tmp/dbginfo")
+!3 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", file: !2, line: 1, align: 8, elements: !4)
+!4 = !{}
+!5 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 3.5 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !4, globals: !6, imports: !4)
+!6 = !{!0}
!7 = !{i32 2, !"Dwarf Version", i32 4}
!8 = !{i32 1, !"Debug Info Version", i32 3}
!9 = !{!"clang version 3.5 "}
+
diff --git a/llvm/test/DebugInfo/X86/concrete_out_of_line.ll b/llvm/test/DebugInfo/X86/concrete_out_of_line.ll
index db2cc9f..8fb496b 100644
--- a/llvm/test/DebugInfo/X86/concrete_out_of_line.ll
+++ b/llvm/test/DebugInfo/X86/concrete_out_of_line.ll
@@ -59,74 +59,77 @@
; CHECK: DW_TAG_inlined_subroutine
; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "_ZN17nsAutoRefCntD2Ev"
+source_filename = "test/DebugInfo/X86/concrete_out_of_line.ll"
-define i32 @_ZN17nsAutoRefCnt7ReleaseEv() !dbg !5 {
+define i32 @_ZN17nsAutoRefCnt7ReleaseEv() !dbg !19 {
entry:
- store i32 1, i32* null, align 4, !dbg !50
- tail call void @_Z8moz_freePv(i8* null) nounwind, !dbg !54
+ store i32 1, i32* null, align 4, !dbg !32
+ tail call void @_Z8moz_freePv(i8* null) #0, !dbg !40
ret i32 0
}
-define void @_ZN17nsAutoRefCntD1Ev() !dbg !23 {
+define void @_ZN17nsAutoRefCntD1Ev() !dbg !46 {
entry:
- tail call void @_Z8moz_freePv(i8* null) nounwind, !dbg !57
+ tail call void @_Z8moz_freePv(i8* null) #0, !dbg !49
ret void
}
declare void @_Z8moz_freePv(i8*)
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!60}
+attributes #0 = { nounwind }
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.1 ()", isOptimized: true, emissionKind: FullDebug, file: !59, enums: !1, retainedTypes: !1, globals: !47, imports: !1)
-!1 = !{}
-!5 = distinct !DISubprogram(name: "Release", linkageName: "_ZN17nsAutoRefCnt7ReleaseEv", line: 14, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 14, file: !6, scope: null, type: !7 , declaration: !12, variables: !20)
-!6 = !DIFile(filename: "nsAutoRefCnt.ii", directory: "/Users/espindola/mozilla-central/obj-x86_64-apple-darwin11.2.0/netwerk/base/src")
-!7 = !DISubroutineType(types: !8)
-!8 = !{!9, !10}
-!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!10 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !11)
-!11 = !DICompositeType(tag: DW_TAG_structure_type, name: "nsAutoRefCnt", line: 10, flags: DIFlagFwdDecl, file: !59)
-!12 = !DISubprogram(name: "Release", linkageName: "_ZN17nsAutoRefCnt7ReleaseEv", line: 11, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 11, file: !6, scope: !13, type: !7, variables: !18)
-!13 = !DICompositeType(tag: DW_TAG_class_type, name: "nsAutoRefCnt", line: 10, size: 8, align: 8, file: !59, elements: !14)
-!14 = !{!12, !15}
-!15 = !DISubprogram(name: "~nsAutoRefCnt", line: 12, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 12, file: !6, scope: !13, type: !16, variables: !18)
+!llvm.dbg.cu = !{!0}
+!llvm.module.flags = !{!18}
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.1 ()", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3, imports: !2)
+!1 = !DIFile(filename: "nsAutoRefCnt.ii", directory: "/Users/espindola/mozilla-central/obj-x86_64-apple-darwin11.2.0/netwerk/base/src")
+!2 = !{}
+!3 = !{!4}
+!4 = !DIGlobalVariableExpression(var: !5)
+!5 = !DIGlobalVariable(name: "mRefCnt", scope: null, file: !1, line: 9, type: !6, isLocal: false, isDefinition: true)
+!6 = !DICompositeType(tag: DW_TAG_class_type, name: "nsAutoRefCnt", file: !1, line: 2, size: 32, align: 32, elements: !7)
+!7 = !{!8, !10, !15}
+!8 = !DIDerivedType(tag: DW_TAG_member, name: "mValue", scope: !6, file: !1, line: 7, baseType: !9, size: 32, align: 32)
+!9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!10 = !DISubprogram(name: "nsAutoRefCnt", scope: !6, file: !1, line: 3, type: !11, isLocal: false, isDefinition: false, scopeLine: 3, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, variables: !2)
+!11 = !DISubroutineType(types: !12)
+!12 = !{null, !13}
+!13 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !14, size: 64, align: 64, flags: DIFlagArtificial)
+!14 = !DICompositeType(tag: DW_TAG_structure_type, name: "nsAutoRefCnt", file: !1, line: 2, flags: DIFlagFwdDecl)
+!15 = !DISubprogram(name: "operator=", linkageName: "_ZN12nsAutoRefCntaSEi", scope: !6, file: !1, line: 4, type: !16, isLocal: false, isDefinition: false, scopeLine: 4, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, variables: !2)
!16 = !DISubroutineType(types: !17)
-!17 = !{null, !10}
-!18 = !{}
-!20 = !{!22}
-!22 = !DILocalVariable(name: "this", line: 14, arg: 1, flags: DIFlagArtificial, scope: !5, file: !6, type: !10)
-!23 = distinct !DISubprogram(name: "~nsAutoRefCnt", linkageName: "_ZN17nsAutoRefCntD1Ev", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 18, file: !6, scope: null, type: !16, declaration: !15, variables: !24)
-!24 = !{!26}
-!26 = !DILocalVariable(name: "this", line: 18, arg: 1, flags: DIFlagArtificial, scope: !23, file: !6, type: !10)
-!27 = distinct !DISubprogram(name: "~nsAutoRefCnt", linkageName: "_ZN17nsAutoRefCntD2Ev", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 18, file: !6, scope: null, type: !16, declaration: !15, variables: !28)
-!28 = !{!30}
-!30 = !DILocalVariable(name: "this", line: 18, arg: 1, flags: DIFlagArtificial, scope: !27, file: !6, type: !10)
-!31 = distinct !DISubprogram(name: "operator=", linkageName: "_ZN12nsAutoRefCntaSEi", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 4, file: !6, scope: null, type: !32, declaration: !36, variables: !43)
-!32 = !DISubroutineType(types: !33)
-!33 = !{!9, !34, !9}
-!34 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !35)
-!35 = !DICompositeType(tag: DW_TAG_structure_type, name: "nsAutoRefCnt", line: 2, flags: DIFlagFwdDecl, file: !59)
-!36 = !DISubprogram(name: "operator=", linkageName: "_ZN12nsAutoRefCntaSEi", line: 4, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 4, file: !6, scope: !37, type: !32, variables: !18)
-!37 = !DICompositeType(tag: DW_TAG_class_type, name: "nsAutoRefCnt", line: 2, size: 32, align: 32, file: !59, elements: !38)
-!38 = !{!39, !40, !36}
-!39 = !DIDerivedType(tag: DW_TAG_member, name: "mValue", line: 7, size: 32, align: 32, file: !59, scope: !37, baseType: !9)
-!40 = !DISubprogram(name: "nsAutoRefCnt", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !6, scope: !37, type: !41, variables: !18)
-!41 = !DISubroutineType(types: !42)
-!42 = !{null, !34}
-!43 = !{!45, !46}
-!45 = !DILocalVariable(name: "this", line: 4, arg: 1, flags: DIFlagArtificial, scope: !31, file: !6, type: !34)
-!46 = !DILocalVariable(name: "aValue", line: 4, arg: 2, scope: !31, file: !6, type: !9)
-!47 = !{!49}
-!49 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "mRefCnt", line: 9, isLocal: false, isDefinition: true, scope: null, file: !6, type: !37))
-!50 = !DILocation(line: 5, column: 5, scope: !51, inlinedAt: !52)
-!51 = distinct !DILexicalBlock(line: 4, column: 29, file: !6, scope: !31)
-!52 = !DILocation(line: 15, scope: !53)
-!53 = distinct !DILexicalBlock(line: 14, column: 34, file: !6, scope: !5)
-!54 = !DILocation(line: 19, column: 3, scope: !55, inlinedAt: !56)
-!55 = distinct !DILexicalBlock(line: 18, column: 41, file: !6, scope: !27)
-!56 = !DILocation(line: 18, column: 41, scope: !23, inlinedAt: !52)
-!57 = !DILocation(line: 19, column: 3, scope: !55, inlinedAt: !58)
-!58 = !DILocation(line: 18, column: 41, scope: !23)
-!59 = !DIFile(filename: "nsAutoRefCnt.ii", directory: "/Users/espindola/mozilla-central/obj-x86_64-apple-darwin11.2.0/netwerk/base/src")
-!60 = !{i32 1, !"Debug Info Version", i32 3}
+!17 = !{!9, !13, !9}
+!18 = !{i32 1, !"Debug Info Version", i32 3}
+!19 = distinct !DISubprogram(name: "Release", linkageName: "_ZN17nsAutoRefCnt7ReleaseEv", scope: null, file: !1, line: 14, type: !20, isLocal: false, isDefinition: true, scopeLine: 14, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, declaration: !24, variables: !30)
+!20 = !DISubroutineType(types: !21)
+!21 = !{!9, !22}
+!22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !23, size: 64, align: 64, flags: DIFlagArtificial)
+!23 = !DICompositeType(tag: DW_TAG_structure_type, name: "nsAutoRefCnt", file: !1, line: 10, flags: DIFlagFwdDecl)
+!24 = !DISubprogram(name: "Release", linkageName: "_ZN17nsAutoRefCnt7ReleaseEv", scope: !25, file: !1, line: 11, type: !20, isLocal: false, isDefinition: false, scopeLine: 11, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, variables: !2)
+!25 = !DICompositeType(tag: DW_TAG_class_type, name: "nsAutoRefCnt", file: !1, line: 10, size: 8, align: 8, elements: !26)
+!26 = !{!24, !27}
+!27 = !DISubprogram(name: "~nsAutoRefCnt", scope: !25, file: !1, line: 12, type: !28, isLocal: false, isDefinition: false, scopeLine: 12, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, variables: !2)
+!28 = !DISubroutineType(types: !29)
+!29 = !{null, !22}
+!30 = !{!31}
+!31 = !DILocalVariable(name: "this", arg: 1, scope: !19, file: !1, line: 14, type: !22, flags: DIFlagArtificial)
+!32 = !DILocation(line: 5, column: 5, scope: !33, inlinedAt: !38)
+!33 = distinct !DILexicalBlock(scope: !34, file: !1, line: 4, column: 29)
+!34 = distinct !DISubprogram(name: "operator=", linkageName: "_ZN12nsAutoRefCntaSEi", scope: null, file: !1, line: 4, type: !16, isLocal: false, isDefinition: true, scopeLine: 4, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, declaration: !15, variables: !35)
+!35 = !{!36, !37}
+!36 = !DILocalVariable(name: "this", arg: 1, scope: !34, file: !1, line: 4, type: !13, flags: DIFlagArtificial)
+!37 = !DILocalVariable(name: "aValue", arg: 2, scope: !34, file: !1, line: 4, type: !9)
+!38 = !DILocation(line: 15, scope: !39)
+!39 = distinct !DILexicalBlock(scope: !19, file: !1, line: 14, column: 34)
+!40 = !DILocation(line: 19, column: 3, scope: !41, inlinedAt: !45)
+!41 = distinct !DILexicalBlock(scope: !42, file: !1, line: 18, column: 41)
+!42 = distinct !DISubprogram(name: "~nsAutoRefCnt", linkageName: "_ZN17nsAutoRefCntD2Ev", scope: null, file: !1, line: 18, type: !28, isLocal: false, isDefinition: true, scopeLine: 18, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, declaration: !27, variables: !43)
+!43 = !{!44}
+!44 = !DILocalVariable(name: "this", arg: 1, scope: !42, file: !1, line: 18, type: !22, flags: DIFlagArtificial)
+!45 = !DILocation(line: 18, column: 41, scope: !46, inlinedAt: !38)
+!46 = distinct !DISubprogram(name: "~nsAutoRefCnt", linkageName: "_ZN17nsAutoRefCntD1Ev", scope: null, file: !1, line: 18, type: !28, isLocal: false, isDefinition: true, scopeLine: 18, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, declaration: !27, variables: !47)
+!47 = !{!48}
+!48 = !DILocalVariable(name: "this", arg: 1, scope: !46, file: !1, line: 18, type: !22, flags: DIFlagArtificial)
+!49 = !DILocation(line: 19, column: 3, scope: !41, inlinedAt: !50)
+!50 = !DILocation(line: 18, column: 41, scope: !46)
+
diff --git a/llvm/test/DebugInfo/X86/cu-ranges-odr.ll b/llvm/test/DebugInfo/X86/cu-ranges-odr.ll
index 404a9d7..cf54aee 100644
--- a/llvm/test/DebugInfo/X86/cu-ranges-odr.ll
+++ b/llvm/test/DebugInfo/X86/cu-ranges-odr.ll
@@ -18,77 +18,81 @@
; Check that we have a relocation against the .debug_ranges section.
; CHECK-RELOCS: R_X86_64_32 .debug_ranges 0x0
+source_filename = "test/DebugInfo/X86/cu-ranges-odr.ll"
+
%class.A = type { i32 }
-@a = global %class.A zeroinitializer, align 4, !dbg !22
+@a = global %class.A zeroinitializer, align 4, !dbg !0
@llvm.global_ctors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 65535, void ()* @_GLOBAL__I_a }]
-define internal void @__cxx_global_var_init() section ".text.startup" !dbg !14 {
+define internal void @__cxx_global_var_init() section ".text.startup" !dbg !18 {
entry:
- call void @_ZN1AC2Ei(%class.A* @a, i32 0), !dbg !26
- ret void, !dbg !26
+ call void @_ZN1AC2Ei(%class.A* @a, i32 0), !dbg !21
+ ret void, !dbg !21
}
; Function Attrs: nounwind uwtable
-define linkonce_odr void @_ZN1AC2Ei(%class.A* %this, i32 %i) unnamed_addr #0 align 2 !dbg !18 {
+define linkonce_odr void @_ZN1AC2Ei(%class.A* %this, i32 %i) unnamed_addr #0 align 2 !dbg !22 {
entry:
%this.addr = alloca %class.A*, align 8
%i.addr = alloca i32, align 4
store %class.A* %this, %class.A** %this.addr, align 8
- call void @llvm.dbg.declare(metadata %class.A** %this.addr, metadata !27, metadata !DIExpression()), !dbg !29
+ call void @llvm.dbg.declare(metadata %class.A** %this.addr, metadata !23, metadata !25), !dbg !26
store i32 %i, i32* %i.addr, align 4
- call void @llvm.dbg.declare(metadata i32* %i.addr, metadata !30, metadata !DIExpression()), !dbg !31
+ call void @llvm.dbg.declare(metadata i32* %i.addr, metadata !27, metadata !25), !dbg !28
%this1 = load %class.A*, %class.A** %this.addr
- %a = getelementptr inbounds %class.A, %class.A* %this1, i32 0, i32 0, !dbg !31
- %0 = load i32, i32* %i.addr, align 4, !dbg !31
- store i32 %0, i32* %a, align 4, !dbg !31
- ret void, !dbg !31
+ %a = getelementptr inbounds %class.A, %class.A* %this1, i32 0, i32 0, !dbg !28
+ %0 = load i32, i32* %i.addr, align 4, !dbg !28
+ store i32 %0, i32* %a, align 4, !dbg !28
+ ret void, !dbg !28
}
; Function Attrs: nounwind readnone
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
-define internal void @_GLOBAL__I_a() section ".text.startup" !dbg !19 {
+define internal void @_GLOBAL__I_a() section ".text.startup" !dbg !29 {
entry:
- call void @__cxx_global_var_init(), !dbg !32
- ret void, !dbg !32
+ call void @__cxx_global_var_init(), !dbg !31
+ ret void, !dbg !31
}
attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { nounwind readnone }
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!23, !24}
-!llvm.ident = !{!25}
+!llvm.dbg.cu = !{!11}
+!llvm.module.flags = !{!15, !16}
+!llvm.ident = !{!17}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 (trunk 199923) (llvm/trunk 199940)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !21, imports: !2)
-!1 = !DIFile(filename: "baz.cpp", directory: "/usr/local/google/home/echristo/tmp")
-!2 = !{}
-!3 = !{!4}
-!4 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 1, size: 32, align: 32, file: !1, elements: !5, identifier: "_ZTS1A")
-!5 = !{!6, !8}
-!6 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 5, size: 32, align: 32, flags: DIFlagPrivate, file: !1, scope: !4, baseType: !7)
-!7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!8 = !DISubprogram(name: "A", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !1, scope: !4, type: !9)
-!9 = !DISubroutineType(types: !10)
-!10 = !{null, !11, !7}
-!11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
-!14 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 8, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 8, file: !1, scope: !15, type: !16, variables: !2)
-!15 = !DIFile(filename: "baz.cpp", directory: "/usr/local/google/home/echristo/tmp")
-!16 = !DISubroutineType(types: !17)
-!17 = !{null}
-!18 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2Ei", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !4, type: !9, declaration: !8, variables: !2)
-!19 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__I_a", line: 3, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !15, type: !20, variables: !2)
-!20 = !DISubroutineType(types: !2)
-!21 = !{!22}
-!22 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", line: 8, isLocal: false, isDefinition: true, scope: null, file: !15, type: !4))
-!23 = !{i32 2, !"Dwarf Version", i32 4}
-!24 = !{i32 1, !"Debug Info Version", i32 3}
-!25 = !{!"clang version 3.5 (trunk 199923) (llvm/trunk 199940)"}
-!26 = !DILocation(line: 8, scope: !14)
-!27 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !18, type: !28)
-!28 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)
-!29 = !DILocation(line: 0, scope: !18)
-!30 = !DILocalVariable(name: "i", line: 3, arg: 2, scope: !18, file: !15, type: !7)
-!31 = !DILocation(line: 3, scope: !18)
-!32 = !DILocation(line: 3, scope: !19)
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "a", scope: null, file: !2, line: 8, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "baz.cpp", directory: "/usr/local/google/home/echristo/tmp")
+!3 = !DICompositeType(tag: DW_TAG_class_type, name: "A", file: !2, line: 1, size: 32, align: 32, elements: !4, identifier: "_ZTS1A")
+!4 = !{!5, !7}
+!5 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !3, file: !2, line: 5, baseType: !6, size: 32, align: 32, flags: DIFlagPrivate)
+!6 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!7 = !DISubprogram(name: "A", scope: !3, file: !2, line: 3, type: !8, isLocal: false, isDefinition: false, scopeLine: 3, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false)
+!8 = !DISubroutineType(types: !9)
+!9 = !{null, !10, !6}
+!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !3, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!11 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.5 (trunk 199923) (llvm/trunk 199940)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !12, retainedTypes: !13, globals: !14, imports: !12)
+!12 = !{}
+!13 = !{!3}
+!14 = !{!0}
+!15 = !{i32 2, !"Dwarf Version", i32 4}
+!16 = !{i32 1, !"Debug Info Version", i32 3}
+!17 = !{!"clang version 3.5 (trunk 199923) (llvm/trunk 199940)"}
+!18 = distinct !DISubprogram(name: "__cxx_global_var_init", scope: !2, file: !2, line: 8, type: !19, isLocal: true, isDefinition: true, scopeLine: 8, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !11, variables: !12)
+!19 = !DISubroutineType(types: !20)
+!20 = !{null}
+!21 = !DILocation(line: 8, scope: !18)
+!22 = distinct !DISubprogram(name: "A", linkageName: "_ZN1AC2Ei", scope: !3, file: !2, line: 3, type: !8, isLocal: false, isDefinition: true, scopeLine: 3, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !11, declaration: !7, variables: !12)
+!23 = !DILocalVariable(name: "this", arg: 1, scope: !22, type: !24, flags: DIFlagArtificial | DIFlagObjectPointer)
+!24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !3, size: 64, align: 64)
+!25 = !DIExpression()
+!26 = !DILocation(line: 0, scope: !22)
+!27 = !DILocalVariable(name: "i", arg: 2, scope: !22, file: !2, line: 3, type: !6)
+!28 = !DILocation(line: 3, scope: !22)
+!29 = distinct !DISubprogram(linkageName: "_GLOBAL__I_a", scope: !2, file: !2, line: 3, type: !30, isLocal: true, isDefinition: true, scopeLine: 3, virtualIndex: 6, flags: DIFlagArtificial, isOptimized: false, unit: !11, variables: !12)
+!30 = !DISubroutineType(types: !12)
+!31 = !DILocation(line: 3, scope: !29)
+
diff --git a/llvm/test/DebugInfo/X86/data_member_location.ll b/llvm/test/DebugInfo/X86/data_member_location.ll
index b54d1aa..71adcd8 100644
--- a/llvm/test/DebugInfo/X86/data_member_location.ll
+++ b/llvm/test/DebugInfo/X86/data_member_location.ll
@@ -26,28 +26,30 @@
; DWARF2-NOT: DW_TAG
; DWARF2: DW_AT_data_member_location {{.*}} (<0x02> 23 04 )
+source_filename = "test/DebugInfo/X86/data_member_location.ll"
+
%struct.foo = type { i8, i32 }
-@f = global %struct.foo zeroinitializer, align 4, !dbg !11
+@f = global %struct.foo zeroinitializer, align 4, !dbg !0
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!13, !15}
-!llvm.ident = !{!14}
+!llvm.dbg.cu = !{!9}
+!llvm.module.flags = !{!13, !14}
+!llvm.ident = !{!15}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !10, imports: !2)
-!1 = !DIFile(filename: "data_member_location.cpp", directory: "/tmp/dbginfo")
-!2 = !{}
-!3 = !{!4}
-!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", line: 1, size: 64, align: 32, file: !1, elements: !5, identifier: "_ZTS3foo")
-!5 = !{!6, !8}
-!6 = !DIDerivedType(tag: DW_TAG_member, name: "c", line: 2, size: 8, align: 8, file: !1, scope: !4, baseType: !7)
-!7 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
-!8 = !DIDerivedType(tag: DW_TAG_member, name: "i", line: 3, size: 32, align: 32, offset: 32, file: !1, scope: !4, baseType: !9)
-!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!10 = !{!11}
-!11 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "f", line: 6, isLocal: false, isDefinition: true, scope: null, file: !12, type: !4))
-!12 = !DIFile(filename: "data_member_location.cpp", directory: "/tmp/dbginfo")
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "f", scope: null, file: !2, line: 6, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "data_member_location.cpp", directory: "/tmp/dbginfo")
+!3 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", file: !2, line: 1, size: 64, align: 32, elements: !4, identifier: "_ZTS3foo")
+!4 = !{!5, !7}
+!5 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !3, file: !2, line: 2, baseType: !6, size: 8, align: 8)
+!6 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
+!7 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !3, file: !2, line: 3, baseType: !8, size: 32, align: 32, offset: 32)
+!8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.4 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !10, retainedTypes: !11, globals: !12, imports: !10)
+!10 = !{}
+!11 = !{!3}
+!12 = !{!0}
!13 = !{i32 2, !"Dwarf Version", i32 4}
-!14 = !{!"clang version 3.4 "}
+!14 = !{i32 1, !"Debug Info Version", i32 3}
+!15 = !{!"clang version 3.4 "}
-!15 = !{i32 1, !"Debug Info Version", i32 3}
diff --git a/llvm/test/DebugInfo/X86/dbg-subrange.ll b/llvm/test/DebugInfo/X86/dbg-subrange.ll
index 50a9411..8044282 100644
--- a/llvm/test/DebugInfo/X86/dbg-subrange.ll
+++ b/llvm/test/DebugInfo/X86/dbg-subrange.ll
@@ -1,34 +1,39 @@
; RUN: llc -O0 < %s | FileCheck %s
; Radar 10464995
+source_filename = "test/DebugInfo/X86/dbg-subrange.ll"
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.7.2"
-@s = common global [4294967296 x i8] zeroinitializer, align 16, !dbg !13
+@s = common global [4294967296 x i8] zeroinitializer, align 16, !dbg !0
; CHECK: .quad 4294967296 ## DW_AT_count
-define void @bar() nounwind uwtable ssp !dbg !5 {
+; Function Attrs: nounwind ssp uwtable
+define void @bar() #0 !dbg !11 {
entry:
- store i8 97, i8* getelementptr inbounds ([4294967296 x i8], [4294967296 x i8]* @s, i32 0, i64 0), align 1, !dbg !18
- ret void, !dbg !20
+ store i8 97, i8* getelementptr inbounds ([4294967296 x i8], [4294967296 x i8]* @s, i32 0, i64 0), align 1, !dbg !14
+ ret void, !dbg !16
}
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!22}
+attributes #0 = { nounwind ssp uwtable }
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 144833)", isOptimized: false, emissionKind: FullDebug, file: !21, enums: !1, retainedTypes: !1, globals: !11, imports: !1)
-!1 = !{}
-!5 = distinct !DISubprogram(name: "bar", line: 4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, file: !21, scope: !6, type: !7)
-!6 = !DIFile(filename: "small.c", directory: "/private/tmp")
-!7 = !DISubroutineType(types: !8)
-!8 = !{null}
-!11 = !{!13}
-!13 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "s", line: 2, isLocal: false, isDefinition: true, scope: null, file: !6, type: !14))
-!14 = !DICompositeType(tag: DW_TAG_array_type, size: 34359738368, align: 8, baseType: !15, elements: !16)
-!15 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
-!16 = !{!17}
-!17 = !DISubrange(count: 4294967296)
-!18 = !DILocation(line: 5, column: 3, scope: !19)
-!19 = distinct !DILexicalBlock(line: 4, column: 1, file: !21, scope: !5)
-!20 = !DILocation(line: 6, column: 1, scope: !19)
-!21 = !DIFile(filename: "small.c", directory: "/private/tmp")
-!22 = !{i32 1, !"Debug Info Version", i32 3}
+!llvm.dbg.cu = !{!7}
+!llvm.module.flags = !{!10}
+
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "s", scope: null, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "small.c", directory: "/private/tmp")
+!3 = !DICompositeType(tag: DW_TAG_array_type, baseType: !4, size: 34359738368, align: 8, elements: !5)
+!4 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
+!5 = !{!6}
+!6 = !DISubrange(count: 4294967296)
+!7 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 3.1 (trunk 144833)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !8, retainedTypes: !8, globals: !9, imports: !8)
+!8 = !{}
+!9 = !{!0}
+!10 = !{i32 1, !"Debug Info Version", i32 3}
+!11 = distinct !DISubprogram(name: "bar", scope: !2, file: !2, line: 4, type: !12, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !7)
+!12 = !DISubroutineType(types: !13)
+!13 = !{null}
+!14 = !DILocation(line: 5, column: 3, scope: !15)
+!15 = distinct !DILexicalBlock(scope: !11, file: !2, line: 4, column: 1)
+!16 = !DILocation(line: 6, column: 1, scope: !15)
+
diff --git a/llvm/test/DebugInfo/X86/dbg-value-inlined-parameter.ll b/llvm/test/DebugInfo/X86/dbg-value-inlined-parameter.ll
index 128150d..08b5062 100644
--- a/llvm/test/DebugInfo/X86/dbg-value-inlined-parameter.ll
+++ b/llvm/test/DebugInfo/X86/dbg-value-inlined-parameter.ll
@@ -39,78 +39,91 @@
;CHECK: DW_AT_abstract_origin {{.*}} "nums"
;CHECK-NOT: DW_TAG_formal_parameter
+source_filename = "test/DebugInfo/X86/dbg-value-inlined-parameter.ll"
+
%struct.S1 = type { float*, i32 }
-@p = common global %struct.S1 zeroinitializer, align 8, !dbg !19
+@p = common global %struct.S1 zeroinitializer, align 8, !dbg !0
-define i32 @foo(%struct.S1* nocapture %sp, i32 %nums) nounwind optsize ssp !dbg !0 {
+; Function Attrs: nounwind optsize ssp
+define i32 @foo(%struct.S1* nocapture %sp, i32 %nums) #0 !dbg !15 {
entry:
- tail call void @llvm.dbg.value(metadata %struct.S1* %sp, i64 0, metadata !9, metadata !DIExpression()), !dbg !20
- tail call void @llvm.dbg.value(metadata i32 %nums, i64 0, metadata !18, metadata !DIExpression()), !dbg !21
- %tmp2 = getelementptr inbounds %struct.S1, %struct.S1* %sp, i64 0, i32 1, !dbg !22
- store i32 %nums, i32* %tmp2, align 4, !dbg !22
- %call = tail call float* @bar(i32 %nums) nounwind optsize, !dbg !27
+ tail call void @llvm.dbg.value(metadata %struct.S1* %sp, i64 0, metadata !19, metadata !22), !dbg !23
+ tail call void @llvm.dbg.value(metadata i32 %nums, i64 0, metadata !21, metadata !22), !dbg !24
+ %tmp2 = getelementptr inbounds %struct.S1, %struct.S1* %sp, i64 0, i32 1, !dbg !25
+ store i32 %nums, i32* %tmp2, align 4, !dbg !25
+ %call = tail call float* @bar(i32 %nums) #3, !dbg !27
%tmp5 = getelementptr inbounds %struct.S1, %struct.S1* %sp, i64 0, i32 0, !dbg !27
store float* %call, float** %tmp5, align 8, !dbg !27
- %cmp = icmp ne float* %call, null, !dbg !29
- %cond = zext i1 %cmp to i32, !dbg !29
- ret i32 %cond, !dbg !29
+ %cmp = icmp ne float* %call, null, !dbg !28
+ %cond = zext i1 %cmp to i32, !dbg !28
+ ret i32 %cond, !dbg !28
}
-declare float* @bar(i32) optsize
+; Function Attrs: optsize
+declare float* @bar(i32) #1
-define void @foobar() nounwind optsize ssp !dbg !6 {
+; Function Attrs: nounwind optsize ssp
+define void @foobar() #0 !dbg !29 {
entry:
- tail call void @llvm.dbg.value(metadata %struct.S1* @p, i64 0, metadata !9, metadata !DIExpression()) nounwind, !dbg !31
- tail call void @llvm.dbg.value(metadata i32 1, i64 0, metadata !18, metadata !DIExpression()) nounwind, !dbg !35
+ tail call void @llvm.dbg.value(metadata %struct.S1* @p, i64 0, metadata !19, metadata !22) #4, !dbg !32
+ tail call void @llvm.dbg.value(metadata i32 1, i64 0, metadata !21, metadata !22) #4, !dbg !35
store i32 1, i32* getelementptr inbounds (%struct.S1, %struct.S1* @p, i64 0, i32 1), align 8, !dbg !36
- %call.i = tail call float* @bar(i32 1) nounwind optsize, !dbg !37
+ %call.i = tail call float* @bar(i32 1) #3, !dbg !37
store float* %call.i, float** getelementptr inbounds (%struct.S1, %struct.S1* @p, i64 0, i32 0), align 8, !dbg !37
ret void, !dbg !38
}
-declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone
+; Function Attrs: nounwind readnone
+
+declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #2
+
+attributes #0 = { nounwind optsize ssp }
+attributes #1 = { optsize }
+attributes #2 = { nounwind readnone }
+attributes #3 = { nounwind optsize }
+attributes #4 = { nounwind }
!llvm.dbg.cu = !{!2}
-!llvm.module.flags = !{!43}
+!llvm.module.flags = !{!14}
-!0 = distinct !DISubprogram(name: "foo", line: 8, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 8, file: !1, scope: !1, type: !3, variables: !41)
-!1 = !DIFile(filename: "nm2.c", directory: "/private/tmp")
-!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 2.9 (trunk 125693)", isOptimized: true, emissionKind: FullDebug, file: !42, enums: !{}, retainedTypes: !{}, globals: !40, imports: !44)
-!3 = !DISubroutineType(types: !4)
-!4 = !{!5}
-!5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!6 = distinct !DISubprogram(name: "foobar", line: 15, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2, file: !1, scope: !1, type: !7)
-!7 = !DISubroutineType(types: !8)
-!8 = !{null}
-!9 = !DILocalVariable(name: "sp", line: 7, arg: 1, scope: !0, file: !1, type: !10)
-!10 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, scope: !2, baseType: !11)
-!11 = !DIDerivedType(tag: DW_TAG_typedef, name: "S1", line: 4, file: !42, scope: !2, baseType: !12)
-!12 = !DICompositeType(tag: DW_TAG_structure_type, name: "S1", line: 1, size: 128, align: 64, file: !42, scope: !2, elements: !13)
-!13 = !{!14, !17}
-!14 = !DIDerivedType(tag: DW_TAG_member, name: "m", line: 2, size: 64, align: 64, file: !42, scope: !1, baseType: !15)
-!15 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, scope: !2, baseType: !16)
-!16 = !DIBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float)
-!17 = !DIDerivedType(tag: DW_TAG_member, name: "nums", line: 3, size: 32, align: 32, offset: 64, file: !42, scope: !1, baseType: !5)
-!18 = !DILocalVariable(name: "nums", line: 7, arg: 2, scope: !0, file: !1, type: !5)
-!19 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "p", line: 14, isLocal: false, isDefinition: true, scope: !2, file: !1, type: !11))
-!20 = !DILocation(line: 7, column: 13, scope: !0)
-!21 = !DILocation(line: 7, column: 21, scope: !0)
-!22 = !DILocation(line: 9, column: 3, scope: !23)
-!23 = distinct !DILexicalBlock(line: 8, column: 1, file: !1, scope: !0)
-!27 = !DILocation(line: 10, column: 3, scope: !23)
-!29 = !DILocation(line: 11, column: 3, scope: !23)
-!30 = !{%struct.S1* @p}
-!31 = !DILocation(line: 7, column: 13, scope: !0, inlinedAt: !32)
-!32 = !DILocation(line: 16, column: 3, scope: !33)
-!33 = distinct !DILexicalBlock(line: 15, column: 15, file: !1, scope: !6)
-!34 = !{i32 1}
-!35 = !DILocation(line: 7, column: 21, scope: !0, inlinedAt: !32)
-!36 = !DILocation(line: 9, column: 3, scope: !23, inlinedAt: !32)
-!37 = !DILocation(line: 10, column: 3, scope: !23, inlinedAt: !32)
-!38 = !DILocation(line: 17, column: 1, scope: !33)
-!40 = !{!19}
-!41 = !{!9, !18}
-!42 = !DIFile(filename: "nm2.c", directory: "/private/tmp")
-!43 = !{i32 1, !"Debug Info Version", i32 3}
-!44 = !{}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "p", scope: !2, file: !3, line: 14, type: !6, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 2.9 (trunk 125693)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !4, globals: !5, imports: !4)
+!3 = !DIFile(filename: "nm2.c", directory: "/private/tmp")
+!4 = !{}
+!5 = !{!0}
+!6 = !DIDerivedType(tag: DW_TAG_typedef, name: "S1", scope: !2, file: !3, line: 4, baseType: !7)
+!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "S1", scope: !2, file: !3, line: 1, size: 128, align: 64, elements: !8)
+!8 = !{!9, !12}
+!9 = !DIDerivedType(tag: DW_TAG_member, name: "m", scope: !3, file: !3, line: 2, baseType: !10, size: 64, align: 64)
+!10 = !DIDerivedType(tag: DW_TAG_pointer_type, scope: !2, baseType: !11, size: 64, align: 64)
+!11 = !DIBasicType(name: "float", size: 32, align: 32, encoding: DW_ATE_float)
+!12 = !DIDerivedType(tag: DW_TAG_member, name: "nums", scope: !3, file: !3, line: 3, baseType: !13, size: 32, align: 32, offset: 64)
+!13 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!14 = !{i32 1, !"Debug Info Version", i32 3}
+!15 = distinct !DISubprogram(name: "foo", scope: !3, file: !3, line: 8, type: !16, isLocal: false, isDefinition: true, scopeLine: 8, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, variables: !18)
+!16 = !DISubroutineType(types: !17)
+!17 = !{!13}
+!18 = !{!19, !21}
+!19 = !DILocalVariable(name: "sp", arg: 1, scope: !15, file: !3, line: 7, type: !20)
+!20 = !DIDerivedType(tag: DW_TAG_pointer_type, scope: !2, baseType: !6, size: 64, align: 64)
+!21 = !DILocalVariable(name: "nums", arg: 2, scope: !15, file: !3, line: 7, type: !13)
+!22 = !DIExpression()
+!23 = !DILocation(line: 7, column: 13, scope: !15)
+!24 = !DILocation(line: 7, column: 21, scope: !15)
+!25 = !DILocation(line: 9, column: 3, scope: !26)
+!26 = distinct !DILexicalBlock(scope: !15, file: !3, line: 8, column: 1)
+!27 = !DILocation(line: 10, column: 3, scope: !26)
+!28 = !DILocation(line: 11, column: 3, scope: !26)
+!29 = distinct !DISubprogram(name: "foobar", scope: !3, file: !3, line: 15, type: !30, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !2)
+!30 = !DISubroutineType(types: !31)
+!31 = !{null}
+!32 = !DILocation(line: 7, column: 13, scope: !15, inlinedAt: !33)
+!33 = !DILocation(line: 16, column: 3, scope: !34)
+!34 = distinct !DILexicalBlock(scope: !29, file: !3, line: 15, column: 15)
+!35 = !DILocation(line: 7, column: 21, scope: !15, inlinedAt: !33)
+!36 = !DILocation(line: 9, column: 3, scope: !26, inlinedAt: !33)
+!37 = !DILocation(line: 10, column: 3, scope: !26, inlinedAt: !33)
+!38 = !DILocation(line: 17, column: 1, scope: !34)
+
diff --git a/llvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll b/llvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll
index 65ca270..93543e5 100644
--- a/llvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll
+++ b/llvm/test/DebugInfo/X86/dbg-value-regmask-clobber.ll
@@ -33,18 +33,19 @@
; DWARF-NEXT: Location description: 52 93 04
; ModuleID = 't.cpp'
+source_filename = "test/DebugInfo/X86/dbg-value-regmask-clobber.ll"
target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-windows-msvc18.0.0"
-@x = common global i32 0, align 4, !dbg !15
+@x = common global i32 0, align 4, !dbg !0
; Function Attrs: nounwind uwtable
-define i32 @main(i32 %argc, i8** nocapture readnone %argv) #0 !dbg !4 {
+define i32 @main(i32 %argc, i8** nocapture readnone %argv) #0 !dbg !12 {
entry:
- tail call void @llvm.dbg.value(metadata i8** %argv, i64 0, metadata !12, metadata !21), !dbg !22
- tail call void @llvm.dbg.value(metadata i32 %argc, i64 0, metadata !13, metadata !21), !dbg !23
+ tail call void @llvm.dbg.value(metadata i8** %argv, i64 0, metadata !19, metadata !21), !dbg !22
+ tail call void @llvm.dbg.value(metadata i32 %argc, i64 0, metadata !20, metadata !21), !dbg !23
store volatile i32 1, i32* @x, align 4, !dbg !24, !tbaa !25
- tail call void @clobber() #3, !dbg !29
+ tail call void @clobber() #2, !dbg !29
store volatile i32 2, i32* @x, align 4, !dbg !30, !tbaa !25
%0 = load volatile i32, i32* @x, align 4, !dbg !31, !tbaa !25
%tobool = icmp eq i32 %0, 0, !dbg !31
@@ -55,6 +56,7 @@
br label %if.end, !dbg !36
if.else: ; preds = %entry
+
store volatile i32 4, i32* @x, align 4, !dbg !37, !tbaa !25
br label %if.end
@@ -65,52 +67,54 @@
declare void @clobber()
; Function Attrs: nounwind readnone
-declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #2
+declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #1
attributes #0 = { nounwind uwtable }
-attributes #2 = { nounwind readnone }
-attributes #3 = { nounwind }
+attributes #1 = { nounwind readnone }
+attributes #2 = { nounwind }
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!17, !18, !19}
-!llvm.ident = !{!20}
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!8, !9, !10}
+!llvm.ident = !{!11}
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 260617) (llvm/trunk 260619)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !14)
-!1 = !DIFile(filename: "t.cpp", directory: "D:\5Csrc\5Cllvm\5Cbuild")
-!2 = !{}
-!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 4, type: !5, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !11)
-!5 = !DISubroutineType(types: !6)
-!6 = !{!7, !7, !8}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "x", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 3.9.0 (trunk 260617) (llvm/trunk 260619)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
+!3 = !DIFile(filename: "t.cpp", directory: "D:\5Csrc\5Cllvm\5Cbuild")
+!4 = !{}
+!5 = !{!0}
+!6 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !7)
!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !9, size: 64, align: 64)
-!9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10, size: 64, align: 64)
-!10 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
-!11 = !{!12, !13}
-!12 = !DILocalVariable(name: "argv", arg: 2, scope: !4, file: !1, line: 4, type: !8)
-!13 = !DILocalVariable(name: "argc", arg: 1, scope: !4, file: !1, line: 4, type: !7)
-!14 = !{!15}
-!15 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "x", scope: !0, file: !1, line: 1, type: !16, isLocal: false, isDefinition: true))
-!16 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !7)
-!17 = !{i32 2, !"Dwarf Version", i32 4}
-!18 = !{i32 2, !"Debug Info Version", i32 3}
-!19 = !{i32 1, !"PIC Level", i32 2}
-!20 = !{!"clang version 3.9.0 (trunk 260617) (llvm/trunk 260619)"}
+!8 = !{i32 2, !"Dwarf Version", i32 4}
+!9 = !{i32 2, !"Debug Info Version", i32 3}
+!10 = !{i32 1, !"PIC Level", i32 2}
+!11 = !{!"clang version 3.9.0 (trunk 260617) (llvm/trunk 260619)"}
+!12 = distinct !DISubprogram(name: "main", scope: !3, file: !3, line: 4, type: !13, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: true, unit: !2, variables: !18)
+!13 = !DISubroutineType(types: !14)
+!14 = !{!7, !7, !15}
+!15 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !16, size: 64, align: 64)
+!16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !17, size: 64, align: 64)
+!17 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
+!18 = !{!19, !20}
+!19 = !DILocalVariable(name: "argv", arg: 2, scope: !12, file: !3, line: 4, type: !15)
+!20 = !DILocalVariable(name: "argc", arg: 1, scope: !12, file: !3, line: 4, type: !7)
!21 = !DIExpression()
-!22 = !DILocation(line: 4, column: 27, scope: !4)
-!23 = !DILocation(line: 4, column: 14, scope: !4)
-!24 = !DILocation(line: 5, column: 5, scope: !4)
+!22 = !DILocation(line: 4, column: 27, scope: !12)
+!23 = !DILocation(line: 4, column: 14, scope: !12)
+!24 = !DILocation(line: 5, column: 5, scope: !12)
!25 = !{!26, !26, i64 0}
!26 = !{!"int", !27, i64 0}
!27 = !{!"omnipotent char", !28, i64 0}
!28 = !{!"Simple C/C++ TBAA"}
-!29 = !DILocation(line: 6, column: 3, scope: !4)
-!30 = !DILocation(line: 7, column: 5, scope: !4)
+!29 = !DILocation(line: 6, column: 3, scope: !12)
+!30 = !DILocation(line: 7, column: 5, scope: !12)
!31 = !DILocation(line: 8, column: 7, scope: !32)
-!32 = distinct !DILexicalBlock(scope: !4, file: !1, line: 8, column: 7)
-!33 = !DILocation(line: 8, column: 7, scope: !4)
+!32 = distinct !DILexicalBlock(scope: !12, file: !3, line: 8, column: 7)
+!33 = !DILocation(line: 8, column: 7, scope: !12)
!34 = !DILocation(line: 9, column: 7, scope: !35)
-!35 = distinct !DILexicalBlock(scope: !32, file: !1, line: 8, column: 10)
+!35 = distinct !DILexicalBlock(scope: !32, file: !3, line: 8, column: 10)
!36 = !DILocation(line: 10, column: 3, scope: !35)
!37 = !DILocation(line: 11, column: 7, scope: !38)
-!38 = distinct !DILexicalBlock(scope: !32, file: !1, line: 10, column: 10)
-!39 = !DILocation(line: 13, column: 1, scope: !4)
+!38 = distinct !DILexicalBlock(scope: !32, file: !3, line: 10, column: 10)
+!39 = !DILocation(line: 13, column: 1, scope: !12)
+
diff --git a/llvm/test/DebugInfo/X86/debug-info-access.ll b/llvm/test/DebugInfo/X86/debug-info-access.ll
index 1ce7635..49af83f 100644
--- a/llvm/test/DebugInfo/X86/debug-info-access.ll
+++ b/llvm/test/DebugInfo/X86/debug-info-access.ll
@@ -84,6 +84,7 @@
; CHECK-NOT: DW_TAG
;
; ModuleID = '/llvm/tools/clang/test/CodeGenCXX/debug-info-access.cpp'
+source_filename = "test/DebugInfo/X86/debug-info-access.ll"
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.10.0"
@@ -91,59 +92,62 @@
%class.B = type { i8 }
%union.U = type { i32 }
-@a = global %struct.A zeroinitializer, align 1, !dbg !35
-@b = global %class.B zeroinitializer, align 1, !dbg !36
-@u = global %union.U zeroinitializer, align 4, !dbg !37
+@a = global %struct.A zeroinitializer, align 1, !dbg !0
+@b = global %class.B zeroinitializer, align 1, !dbg !11
+@u = global %union.U zeroinitializer, align 4, !dbg !23
; Function Attrs: nounwind ssp uwtable
-define void @_Z4freev() #0 !dbg !30 {
- ret void, !dbg !41
+define void @_Z4freev() #0 !dbg !39 {
+ ret void, !dbg !42
}
attributes #0 = { nounwind ssp uwtable }
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!38, !39}
-!llvm.ident = !{!40}
+!llvm.dbg.cu = !{!32}
+!llvm.module.flags = !{!36, !37}
+!llvm.ident = !{!38}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !34, imports: !2)
-!1 = !DIFile(filename: "/llvm/tools/clang/test/CodeGenCXX/debug-info-access.cpp", directory: "")
-!2 = !{}
-!3 = !{!4, !12, !22}
-!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 3, size: 8, align: 8, file: !1, elements: !5, identifier: "_ZTS1A")
-!5 = !{!6, !8}
-!6 = !DIDerivedType(tag: DW_TAG_member, name: "pub_default_static", line: 7, flags: DIFlagStaticMember, file: !1, scope: !4, baseType: !7)
-!7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!8 = !DISubprogram(name: "pub_default", linkageName: "_ZN1A11pub_defaultEv", line: 5, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 5, file: !1, scope: !4, type: !9)
-!9 = !DISubroutineType(types: !10)
-!10 = !{null, !11}
-!11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
-!12 = !DICompositeType(tag: DW_TAG_class_type, name: "B", line: 11, size: 8, align: 8, file: !1, elements: !13, identifier: "_ZTS1B")
-!13 = !{!14, !15, !16, !20, !21}
-!14 = !DIDerivedType(tag: DW_TAG_inheritance, flags: DIFlagPublic, scope: !12, baseType: !4)
-!15 = !DIDerivedType(tag: DW_TAG_member, name: "public_static", line: 16, flags: DIFlagPublic | DIFlagStaticMember, file: !1, scope: !12, baseType: !7)
-!16 = !DISubprogram(name: "pub", linkageName: "_ZN1B3pubEv", line: 14, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false, scopeLine: 14, file: !1, scope: !12, type: !17)
-!17 = !DISubroutineType(types: !18)
-!18 = !{null, !19}
-!19 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !12)
-!20 = !DISubprogram(name: "prot", linkageName: "_ZN1B4protEv", line: 19, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagProtected | DIFlagPrototyped, isOptimized: false, scopeLine: 19, file: !1, scope: !12, type: !17)
-!21 = !DISubprogram(name: "priv_default", linkageName: "_ZN1B12priv_defaultEv", line: 22, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 22, file: !1, scope: !12, type: !17)
-!22 = !DICompositeType(tag: DW_TAG_union_type, name: "U", line: 25, size: 32, align: 32, file: !1, elements: !23, identifier: "_ZTS1U")
-!23 = !{!24, !25}
-!24 = !DIDerivedType(tag: DW_TAG_member, name: "union_priv", line: 30, size: 32, align: 32, flags: DIFlagPrivate, file: !1, scope: !22, baseType: !7)
-!25 = !DISubprogram(name: "union_pub_default", linkageName: "_ZN1U17union_pub_defaultEv", line: 27, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 27, file: !1, scope: !22, type: !26)
-!26 = !DISubroutineType(types: !27)
-!27 = !{null, !28}
-!28 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !22)
-!30 = distinct !DISubprogram(name: "free", linkageName: "_Z4freev", line: 35, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 35, file: !1, scope: !31, type: !32, variables: !2)
-!31 = !DIFile(filename: "/llvm/tools/clang/test/CodeGenCXX/debug-info-access.cpp", directory: "")
-!32 = !DISubroutineType(types: !33)
-!33 = !{null}
-!34 = !{!35, !36, !37}
-!35 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", line: 37, isLocal: false, isDefinition: true, scope: null, file: !31, type: !4))
-!36 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "b", line: 38, isLocal: false, isDefinition: true, scope: null, file: !31, type: !12))
-!37 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "u", line: 39, isLocal: false, isDefinition: true, scope: null, file: !31, type: !22))
-!38 = !{i32 2, !"Dwarf Version", i32 2}
-!39 = !{i32 2, !"Debug Info Version", i32 3}
-!40 = !{!"clang version 3.6.0 "}
-!41 = !DILocation(line: 35, column: 14, scope: !30)
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "a", scope: null, file: !2, line: 37, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "/llvm/tools/clang/test/CodeGenCXX/debug-info-access.cpp", directory: "")
+!3 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !2, line: 3, size: 8, align: 8, elements: !4, identifier: "_ZTS1A")
+!4 = !{!5, !7}
+!5 = !DIDerivedType(tag: DW_TAG_member, name: "pub_default_static", scope: !3, file: !2, line: 7, baseType: !6, flags: DIFlagStaticMember)
+!6 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!7 = !DISubprogram(name: "pub_default", linkageName: "_ZN1A11pub_defaultEv", scope: !3, file: !2, line: 5, type: !8, isLocal: false, isDefinition: false, scopeLine: 5, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false)
+!8 = !DISubroutineType(types: !9)
+!9 = !{null, !10}
+!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !3, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!11 = !DIGlobalVariableExpression(var: !12)
+!12 = !DIGlobalVariable(name: "b", scope: null, file: !2, line: 38, type: !13, isLocal: false, isDefinition: true)
+!13 = !DICompositeType(tag: DW_TAG_class_type, name: "B", file: !2, line: 11, size: 8, align: 8, elements: !14, identifier: "_ZTS1B")
+!14 = !{!15, !16, !17, !21, !22}
+!15 = !DIDerivedType(tag: DW_TAG_inheritance, scope: !13, baseType: !3, flags: DIFlagPublic)
+!16 = !DIDerivedType(tag: DW_TAG_member, name: "public_static", scope: !13, file: !2, line: 16, baseType: !6, flags: DIFlagPublic | DIFlagStaticMember)
+!17 = !DISubprogram(name: "pub", linkageName: "_ZN1B3pubEv", scope: !13, file: !2, line: 14, type: !18, isLocal: false, isDefinition: false, scopeLine: 14, virtualIndex: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: false)
+!18 = !DISubroutineType(types: !19)
+!19 = !{null, !20}
+!20 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !13, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!21 = !DISubprogram(name: "prot", linkageName: "_ZN1B4protEv", scope: !13, file: !2, line: 19, type: !18, isLocal: false, isDefinition: false, scopeLine: 19, virtualIndex: 6, flags: DIFlagProtected | DIFlagPrototyped, isOptimized: false)
+!22 = !DISubprogram(name: "priv_default", linkageName: "_ZN1B12priv_defaultEv", scope: !13, file: !2, line: 22, type: !18, isLocal: false, isDefinition: false, scopeLine: 22, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false)
+!23 = !DIGlobalVariableExpression(var: !24)
+!24 = !DIGlobalVariable(name: "u", scope: null, file: !2, line: 39, type: !25, isLocal: false, isDefinition: true)
+!25 = !DICompositeType(tag: DW_TAG_union_type, name: "U", file: !2, line: 25, size: 32, align: 32, elements: !26, identifier: "_ZTS1U")
+!26 = !{!27, !28}
+!27 = !DIDerivedType(tag: DW_TAG_member, name: "union_priv", scope: !25, file: !2, line: 30, baseType: !6, size: 32, align: 32, flags: DIFlagPrivate)
+!28 = !DISubprogram(name: "union_pub_default", linkageName: "_ZN1U17union_pub_defaultEv", scope: !25, file: !2, line: 27, type: !29, isLocal: false, isDefinition: false, scopeLine: 27, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false)
+!29 = !DISubroutineType(types: !30)
+!30 = !{null, !31}
+!31 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !25, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!32 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.6.0 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !33, retainedTypes: !34, globals: !35, imports: !33)
+!33 = !{}
+!34 = !{!3, !13, !25}
+!35 = !{!0, !11, !23}
+!36 = !{i32 2, !"Dwarf Version", i32 2}
+!37 = !{i32 2, !"Debug Info Version", i32 3}
+!38 = !{!"clang version 3.6.0 "}
+!39 = distinct !DISubprogram(name: "free", linkageName: "_Z4freev", scope: !2, file: !2, line: 35, type: !40, isLocal: false, isDefinition: true, scopeLine: 35, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !32, variables: !33)
+!40 = !DISubroutineType(types: !41)
+!41 = !{null}
+!42 = !DILocation(line: 35, column: 14, scope: !39)
+
diff --git a/llvm/test/DebugInfo/X86/debug-info-packed-struct.ll b/llvm/test/DebugInfo/X86/debug-info-packed-struct.ll
index dd4b188..38b924f 100644
--- a/llvm/test/DebugInfo/X86/debug-info-packed-struct.ll
+++ b/llvm/test/DebugInfo/X86/debug-info-packed-struct.ll
@@ -1,8 +1,8 @@
; Generated from tools/clang/test/CodeGen/debug-info-packed-struct.c
; ModuleID = 'llvm/tools/clang/test/CodeGen/debug-info-packed-struct.c'
+source_filename = "test/DebugInfo/X86/debug-info-packed-struct.ll"
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-darwin"
-
; RUN: %llc_dwarf -O0 -filetype=obj -o %t.o %s
; RUN: llvm-dwarfdump -debug-dump=info %t.o | FileCheck %s
; REQUIRES: object-emission
@@ -22,6 +22,8 @@
%struct.layout0 = type { i8, %struct.size8, i8 }
%struct.size8 = type { i64 }
+%struct.layout1 = type <{ i8, %struct.size8_anon, i8, [2 x i8] }>
+%struct.size8_anon = type { i64 }
; CHECK: DW_TAG_structure_type
; CHECK: DW_AT_name {{.*}} "layout0"
; CHECK: DW_AT_byte_size {{.*}} (0x18)
@@ -37,7 +39,6 @@
; CHECK: DW_AT_bit_offset {{.*}} (0x1f)
; CHECK: DW_AT_data_member_location {{.*}}10
-
; // ---------------------------------------------------------------------
; // Implicitly packed.
; // ---------------------------------------------------------------------
@@ -51,8 +52,10 @@
; int l1_ofs9 : 1;
; } l1;
-%struct.layout1 = type <{ i8, %struct.size8_anon, i8, [2 x i8] }>
-%struct.size8_anon = type { i64 }
+%struct.layout2 = type <{ i8, %struct.size8_pack1, i8 }>
+%struct.size8_pack1 = type { i64 }
+%struct.layout3 = type <{ i8, [3 x i8], %struct.size8_pack4, i8, [3 x i8] }>
+%struct.size8_pack4 = type { i64 }
; CHECK: DW_TAG_structure_type
; CHECK: DW_AT_name {{.*}} "layout1"
@@ -85,9 +88,8 @@
; } l2;
; #pragma pack()
-%struct.layout2 = type <{ i8, %struct.size8_pack1, i8 }>
-%struct.size8_pack1 = type { i64 }
-
+@l0 = common global %struct.layout0 zeroinitializer, align 8, !dbg !0
+@l1 = common global %struct.layout1 zeroinitializer, align 4, !dbg !6
; CHECK: DW_TAG_structure_type
; CHECK: DW_AT_name {{.*}} "layout2"
; CHECK: DW_AT_byte_size {{.*}} (0x0a)
@@ -119,10 +121,8 @@
; } l 3;
; #pragma pack()
-
-%struct.layout3 = type <{ i8, [3 x i8], %struct.size8_pack4, i8, [3 x i8] }>
-%struct.size8_pack4 = type { i64 }
-
+@l2 = common global %struct.layout2 zeroinitializer, align 1, !dbg !17
+@l3 = common global %struct.layout3 zeroinitializer, align 4, !dbg !29
; CHECK: DW_TAG_structure_type
; CHECK: DW_AT_name {{.*}} "layout3"
; CHECK: DW_AT_byte_size {{.*}} (0x10)
@@ -139,60 +139,60 @@
; CHECK: DW_AT_bit_offset {{.*}} (0x1f)
; CHECK: DW_AT_data_member_location {{.*}}0c
-@l0 = common global %struct.layout0 zeroinitializer, align 8, !dbg !4
-@l1 = common global %struct.layout1 zeroinitializer, align 4, !dbg !18
-@l2 = common global %struct.layout2 zeroinitializer, align 1, !dbg !25
-@l3 = common global %struct.layout3 zeroinitializer, align 4, !dbg !35
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!49, !50}
+!llvm.ident = !{!51}
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!45, !46}
-!llvm.ident = !{!47}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "l0", scope: !2, file: !8, line: 88, type: !40, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 3.7.0 (trunk 240791) (llvm/trunk 240790)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !4, globals: !5, imports: !4)
+!3 = !DIFile(filename: "/llvm/tools/clang/test/CodeGen/<stdin>", directory: "/llvm/_build.ninja.release")
+!4 = !{}
+!5 = !{!0, !6, !17, !29}
+!6 = !DIGlobalVariableExpression(var: !7)
+!7 = !DIGlobalVariable(name: "l1", scope: !2, file: !8, line: 89, type: !9, isLocal: false, isDefinition: true)
+!8 = !DIFile(filename: "/llvm/tools/clang/test/CodeGen/debug-info-packed-struct.c", directory: "/llvm/_build.ninja.release")
+!9 = !DICompositeType(tag: DW_TAG_structure_type, name: "layout1", file: !8, line: 34, size: 96, elements: !10)
+!10 = !{!11, !13, !15}
+!11 = !DIDerivedType(tag: DW_TAG_member, name: "l1_ofs0", scope: !9, file: !8, line: 35, baseType: !12, size: 8)
+!12 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
+!13 = !DIDerivedType(tag: DW_TAG_member, name: "l1_ofs1", scope: !9, file: !8, line: 36, baseType: !14, size: 64, offset: 8)
+!14 = !DICompositeType(tag: DW_TAG_structure_type, name: "size8_anon", file: !8, line: 30, size: 64, elements: !4)
+!15 = !DIDerivedType(tag: DW_TAG_member, name: "l1_ofs9", scope: !9, file: !8, line: 37, baseType: !16, size: 1, offset: 72)
+!16 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+!17 = !DIGlobalVariableExpression(var: !18)
+!18 = !DIGlobalVariable(name: "l2", scope: !2, file: !8, line: 90, type: !19, isLocal: false, isDefinition: true)
+!19 = !DICompositeType(tag: DW_TAG_structure_type, name: "layout2", file: !8, line: 54, size: 80, elements: !20)
+!20 = !{!21, !22, !28}
+!21 = !DIDerivedType(tag: DW_TAG_member, name: "l2_ofs0", scope: !19, file: !8, line: 55, baseType: !12, size: 8)
+!22 = !DIDerivedType(tag: DW_TAG_member, name: "l2_ofs1", scope: !19, file: !8, line: 56, baseType: !23, size: 64, offset: 8)
+!23 = !DICompositeType(tag: DW_TAG_structure_type, name: "size8_pack1", file: !8, line: 50, size: 64, elements: !24)
+!24 = !{!25, !26}
+!25 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !23, file: !8, line: 51, baseType: !16, size: 4)
+!26 = !DIDerivedType(tag: DW_TAG_member, name: "l", scope: !23, file: !8, line: 52, baseType: !27, size: 60, offset: 4)
+!27 = !DIBasicType(name: "long long int", size: 64, encoding: DW_ATE_signed)
+!28 = !DIDerivedType(tag: DW_TAG_member, name: "l2_ofs9", scope: !19, file: !8, line: 57, baseType: !16, size: 1, offset: 72)
+!29 = !DIGlobalVariableExpression(var: !30)
+!30 = !DIGlobalVariable(name: "l3", scope: !2, file: !8, line: 91, type: !31, isLocal: false, isDefinition: true)
+!31 = !DICompositeType(tag: DW_TAG_structure_type, name: "layout3", file: !8, line: 76, size: 128, elements: !32)
+!32 = !{!33, !34, !39}
+!33 = !DIDerivedType(tag: DW_TAG_member, name: "l3_ofs0", scope: !31, file: !8, line: 77, baseType: !12, size: 8)
+!34 = !DIDerivedType(tag: DW_TAG_member, name: "l3_ofs4", scope: !31, file: !8, line: 78, baseType: !35, size: 64, offset: 32)
+!35 = !DICompositeType(tag: DW_TAG_structure_type, name: "size8_pack4", file: !8, line: 72, size: 64, elements: !36)
+!36 = !{!37, !38}
+!37 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !35, file: !8, line: 73, baseType: !16, size: 4)
+!38 = !DIDerivedType(tag: DW_TAG_member, name: "l", scope: !35, file: !8, line: 74, baseType: !27, size: 60, offset: 4)
+!39 = !DIDerivedType(tag: DW_TAG_member, name: "l3_ofs12", scope: !31, file: !8, line: 79, baseType: !16, size: 1, offset: 96)
+!40 = !DICompositeType(tag: DW_TAG_structure_type, name: "layout0", file: !8, line: 15, size: 192, elements: !41)
+!41 = !{!42, !43, !48}
+!42 = !DIDerivedType(tag: DW_TAG_member, name: "l0_ofs0", scope: !40, file: !8, line: 16, baseType: !12, size: 8)
+!43 = !DIDerivedType(tag: DW_TAG_member, name: "l0_ofs8", scope: !40, file: !8, line: 17, baseType: !44, size: 64, offset: 64)
+!44 = !DICompositeType(tag: DW_TAG_structure_type, name: "size8", file: !8, line: 11, size: 64, elements: !45)
+!45 = !{!46, !47}
+!46 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !44, file: !8, line: 12, baseType: !16, size: 4)
+!47 = !DIDerivedType(tag: DW_TAG_member, name: "l", scope: !44, file: !8, line: 13, baseType: !27, size: 60, offset: 4)
+!48 = !DIDerivedType(tag: DW_TAG_member, name: "l0_ofs16", scope: !40, file: !8, line: 18, baseType: !16, size: 1, offset: 128)
+!49 = !{i32 2, !"Dwarf Version", i32 2}
+!50 = !{i32 2, !"Debug Info Version", i32 3}
+!51 = !{!"clang version 3.7.0 (trunk 240791) (llvm/trunk 240790)"}
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.7.0 (trunk 240791) (llvm/trunk 240790)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3, imports: !2)
-!1 = !DIFile(filename: "/llvm/tools/clang/test/CodeGen/<stdin>", directory: "/llvm/_build.ninja.release")
-!2 = !{}
-!3 = !{!4, !18, !25, !35}
-!4 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "l0", scope: !0, file: !5, line: 88, type: !6, isLocal: false, isDefinition: true))
-!5 = !DIFile(filename: "/llvm/tools/clang/test/CodeGen/debug-info-packed-struct.c", directory: "/llvm/_build.ninja.release")
-!6 = !DICompositeType(tag: DW_TAG_structure_type, name: "layout0", file: !5, line: 15, size: 192, elements: !7)
-!7 = !{!8, !10, !17}
-!8 = !DIDerivedType(tag: DW_TAG_member, name: "l0_ofs0", scope: !6, file: !5, line: 16, baseType: !9, size: 8)
-!9 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
-!10 = !DIDerivedType(tag: DW_TAG_member, name: "l0_ofs8", scope: !6, file: !5, line: 17, baseType: !11, size: 64, offset: 64)
-!11 = !DICompositeType(tag: DW_TAG_structure_type, name: "size8", file: !5, line: 11, size: 64, elements: !12)
-!12 = !{!13, !15}
-!13 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !11, file: !5, line: 12, baseType: !14, size: 4)
-!14 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-!15 = !DIDerivedType(tag: DW_TAG_member, name: "l", scope: !11, file: !5, line: 13, baseType: !16, size: 60, offset: 4)
-!16 = !DIBasicType(name: "long long int", size: 64, encoding: DW_ATE_signed)
-!17 = !DIDerivedType(tag: DW_TAG_member, name: "l0_ofs16", scope: !6, file: !5, line: 18, baseType: !14, size: 1, offset: 128)
-!18 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "l1", scope: !0, file: !5, line: 89, type: !19, isLocal: false, isDefinition: true))
-!19 = !DICompositeType(tag: DW_TAG_structure_type, name: "layout1", file: !5, line: 34, size: 96, elements: !20)
-!20 = !{!21, !22, !24}
-!21 = !DIDerivedType(tag: DW_TAG_member, name: "l1_ofs0", scope: !19, file: !5, line: 35, baseType: !9, size: 8)
-!22 = !DIDerivedType(tag: DW_TAG_member, name: "l1_ofs1", scope: !19, file: !5, line: 36, baseType: !23, size: 64, offset: 8)
-!23 = !DICompositeType(tag: DW_TAG_structure_type, name: "size8_anon", file: !5, line: 30, size: 64, elements: !2)
-!24 = !DIDerivedType(tag: DW_TAG_member, name: "l1_ofs9", scope: !19, file: !5, line: 37, baseType: !14, size: 1, offset: 72)
-!25 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "l2", scope: !0, file: !5, line: 90, type: !26, isLocal: false, isDefinition: true))
-!26 = !DICompositeType(tag: DW_TAG_structure_type, name: "layout2", file: !5, line: 54, size: 80, elements: !27)
-!27 = !{!28, !29, !34}
-!28 = !DIDerivedType(tag: DW_TAG_member, name: "l2_ofs0", scope: !26, file: !5, line: 55, baseType: !9, size: 8)
-!29 = !DIDerivedType(tag: DW_TAG_member, name: "l2_ofs1", scope: !26, file: !5, line: 56, baseType: !30, size: 64, offset: 8)
-!30 = !DICompositeType(tag: DW_TAG_structure_type, name: "size8_pack1", file: !5, line: 50, size: 64, elements: !31)
-!31 = !{!32, !33}
-!32 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !30, file: !5, line: 51, baseType: !14, size: 4)
-!33 = !DIDerivedType(tag: DW_TAG_member, name: "l", scope: !30, file: !5, line: 52, baseType: !16, size: 60, offset: 4)
-!34 = !DIDerivedType(tag: DW_TAG_member, name: "l2_ofs9", scope: !26, file: !5, line: 57, baseType: !14, size: 1, offset: 72)
-!35 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "l3", scope: !0, file: !5, line: 91, type: !36, isLocal: false, isDefinition: true))
-!36 = !DICompositeType(tag: DW_TAG_structure_type, name: "layout3", file: !5, line: 76, size: 128, elements: !37)
-!37 = !{!38, !39, !44}
-!38 = !DIDerivedType(tag: DW_TAG_member, name: "l3_ofs0", scope: !36, file: !5, line: 77, baseType: !9, size: 8)
-!39 = !DIDerivedType(tag: DW_TAG_member, name: "l3_ofs4", scope: !36, file: !5, line: 78, baseType: !40, size: 64, offset: 32)
-!40 = !DICompositeType(tag: DW_TAG_structure_type, name: "size8_pack4", file: !5, line: 72, size: 64, elements: !41)
-!41 = !{!42, !43}
-!42 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !40, file: !5, line: 73, baseType: !14, size: 4)
-!43 = !DIDerivedType(tag: DW_TAG_member, name: "l", scope: !40, file: !5, line: 74, baseType: !16, size: 60, offset: 4)
-!44 = !DIDerivedType(tag: DW_TAG_member, name: "l3_ofs12", scope: !36, file: !5, line: 79, baseType: !14, size: 1, offset: 96)
-!45 = !{i32 2, !"Dwarf Version", i32 2}
-!46 = !{i32 2, !"Debug Info Version", i32 3}
-!47 = !{!"clang version 3.7.0 (trunk 240791) (llvm/trunk 240790)"}
diff --git a/llvm/test/DebugInfo/X86/debug-info-static-member.ll b/llvm/test/DebugInfo/X86/debug-info-static-member.ll
index 55d6588..41ec7ca 100644
--- a/llvm/test/DebugInfo/X86/debug-info-static-member.ll
+++ b/llvm/test/DebugInfo/X86/debug-info-static-member.ll
@@ -36,59 +36,71 @@
; return C::c;
; }
+source_filename = "test/DebugInfo/X86/debug-info-static-member.ll"
+
%class.C = type { i32 }
-@_ZN1C1aE = global i32 4, align 4, !dbg !12
-@_ZN1C1bE = global i32 2, align 4, !dbg !27
-@_ZN1C1cE = global i32 1, align 4, !dbg !28
+@_ZN1C1aE = global i32 4, align 4, !dbg !0
+@_ZN1C1bE = global i32 2, align 4, !dbg !18
+@_ZN1C1cE = global i32 1, align 4, !dbg !20
-define i32 @main() nounwind uwtable !dbg !5 {
+; Function Attrs: nounwind uwtable
+define i32 @main() #0 !dbg !26 {
entry:
%retval = alloca i32, align 4
%instance_C = alloca %class.C, align 4
store i32 0, i32* %retval
- call void @llvm.dbg.declare(metadata %class.C* %instance_C, metadata !29, metadata !DIExpression()), !dbg !30
- %d = getelementptr inbounds %class.C, %class.C* %instance_C, i32 0, i32 0, !dbg !31
- store i32 8, i32* %d, align 4, !dbg !31
- %0 = load i32, i32* @_ZN1C1cE, align 4, !dbg !32
- ret i32 %0, !dbg !32
+ call void @llvm.dbg.declare(metadata %class.C* %instance_C, metadata !29, metadata !30), !dbg !31
+ %d = getelementptr inbounds %class.C, %class.C* %instance_C, i32 0, i32 0, !dbg !32
+ store i32 8, i32* %d, align 4, !dbg !32
+ %0 = load i32, i32* @_ZN1C1cE, align 4, !dbg !33
+ ret i32 %0, !dbg !33
}
-declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
+; Function Attrs: nounwind readnone
+declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!34}
+attributes #0 = { nounwind uwtable }
+attributes #1 = { nounwind readnone }
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 171914)", isOptimized: false, emissionKind: FullDebug, file: !33, enums: !1, retainedTypes: !1, globals: !10, imports: !1)
-!1 = !{}
-!5 = distinct !DISubprogram(name: "main", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 23, file: !33, scope: !6, type: !7, variables: !1)
-!6 = !DIFile(filename: "/usr/local/google/home/blaikie/Development/llvm/src/tools/clang/test/CodeGenCXX/debug-info-static-member.cpp", directory: "/home/blaikie/local/Development/llvm/build/clang/x86-64/Debug/llvm")
-!7 = !DISubroutineType(types: !8)
-!8 = !{!9}
-!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!10 = !{!12, !27, !28}
-!12 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", linkageName: "_ZN1C1aE", line: 14, isLocal: false, isDefinition: true, scope: null, file: !6, type: !9, declaration: !15))
-!13 = !DICompositeType(tag: DW_TAG_class_type, name: "C", line: 1, size: 32, align: 32, file: !33, elements: !14)
-!14 = !{!15, !16, !19, !20, !23, !24, !26}
-!15 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 3, flags: DIFlagPrivate | DIFlagStaticMember, file: !33, scope: !13, baseType: !9)
-!16 = !DIDerivedType(tag: DW_TAG_member, name: "const_a", line: 4, flags: DIFlagPrivate | DIFlagStaticMember, file: !33, scope: !13, baseType: !17, extraData: i1 true)
-!17 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !18)
-!18 = !DIBasicType(tag: DW_TAG_base_type, name: "bool", size: 8, align: 8, encoding: DW_ATE_boolean)
-!19 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 6, flags: DIFlagProtected | DIFlagStaticMember, file: !33, scope: !13, baseType: !9)
-!20 = !DIDerivedType(tag: DW_TAG_member, name: "const_b", line: 7, flags: DIFlagProtected | DIFlagStaticMember, file: !33, scope: !13, baseType: !21, extraData: float 0x40091EB860000000)
-!21 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !22)
-!22 = !DIBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float)
-!23 = !DIDerivedType(tag: DW_TAG_member, name: "c", line: 9, flags: DIFlagPublic | DIFlagStaticMember, file: !33, scope: !13, baseType: !9)
-!24 = !DIDerivedType(tag: DW_TAG_member, name: "const_c", line: 10, flags: DIFlagPublic | DIFlagStaticMember, file: !33, scope: !13, baseType: !25, extraData: i32 18)
-!25 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !9)
-!26 = !DIDerivedType(tag: DW_TAG_member, name: "d", line: 11, size: 32, align: 32, flags: DIFlagPublic, file: !33, scope: !13, baseType: !9)
-!27 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "b", linkageName: "_ZN1C1bE", line: 15, isLocal: false, isDefinition: true, scope: null, file: !6, type: !9, declaration: !19))
-!28 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "c", linkageName: "_ZN1C1cE", line: 16, isLocal: false, isDefinition: true, scope: null, file: !6, type: !9, declaration: !23))
-!29 = !DILocalVariable(name: "instance_C", line: 20, scope: !5, file: !6, type: !13)
-!30 = !DILocation(line: 20, scope: !5)
-!31 = !DILocation(line: 21, scope: !5)
-!32 = !DILocation(line: 22, scope: !5)
-!33 = !DIFile(filename: "/usr/local/google/home/blaikie/Development/llvm/src/tools/clang/test/CodeGenCXX/debug-info-static-member.cpp", directory: "/home/blaikie/local/Development/llvm/build/clang/x86-64/Debug/llvm")
+!llvm.dbg.cu = !{!22}
+!llvm.module.flags = !{!25}
+
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "a", linkageName: "_ZN1C1aE", scope: null, file: !2, line: 14, type: !3, isLocal: false, isDefinition: true, declaration: !4)
+!2 = !DIFile(filename: "/usr/local/google/home/blaikie/Development/llvm/src/tools/clang/test/CodeGenCXX/debug-info-static-member.cpp", directory: "/home/blaikie/local/Development/llvm/build/clang/x86-64/Debug/llvm")
+!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!4 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !5, file: !2, line: 3, baseType: !3, flags: DIFlagPrivate | DIFlagStaticMember)
+!5 = !DICompositeType(tag: DW_TAG_class_type, name: "C", file: !2, line: 1, size: 32, align: 32, elements: !6)
+!6 = !{!4, !7, !10, !11, !14, !15, !17}
+!7 = !DIDerivedType(tag: DW_TAG_member, name: "const_a", scope: !5, file: !2, line: 4, baseType: !8, flags: DIFlagPrivate | DIFlagStaticMember, extraData: i1 true)
+!8 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !9)
+!9 = !DIBasicType(name: "bool", size: 8, align: 8, encoding: DW_ATE_boolean)
+!10 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !5, file: !2, line: 6, baseType: !3, flags: DIFlagProtected | DIFlagStaticMember)
+!11 = !DIDerivedType(tag: DW_TAG_member, name: "const_b", scope: !5, file: !2, line: 7, baseType: !12, flags: DIFlagProtected | DIFlagStaticMember, extraData: float 0x40091EB860000000)
+!12 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !13)
+!13 = !DIBasicType(name: "float", size: 32, align: 32, encoding: DW_ATE_float)
+!14 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !5, file: !2, line: 9, baseType: !3, flags: DIFlagPublic | DIFlagStaticMember)
+!15 = !DIDerivedType(tag: DW_TAG_member, name: "const_c", scope: !5, file: !2, line: 10, baseType: !16, flags: DIFlagPublic | DIFlagStaticMember, extraData: i32 18)
+!16 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !3)
+!17 = !DIDerivedType(tag: DW_TAG_member, name: "d", scope: !5, file: !2, line: 11, baseType: !3, size: 32, align: 32, flags: DIFlagPublic)
+!18 = !DIGlobalVariableExpression(var: !19)
+!19 = !DIGlobalVariable(name: "b", linkageName: "_ZN1C1bE", scope: null, file: !2, line: 15, type: !3, isLocal: false, isDefinition: true, declaration: !10)
+!20 = !DIGlobalVariableExpression(var: !21)
+!21 = !DIGlobalVariable(name: "c", linkageName: "_ZN1C1cE", scope: null, file: !2, line: 16, type: !3, isLocal: false, isDefinition: true, declaration: !14)
+!22 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.3 (trunk 171914)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !23, retainedTypes: !23, globals: !24, imports: !23)
+!23 = !{}
+!24 = !{!0, !18, !20}
+!25 = !{i32 1, !"Debug Info Version", i32 3}
+!26 = distinct !DISubprogram(name: "main", scope: !2, file: !2, line: 18, type: !27, isLocal: false, isDefinition: true, scopeLine: 23, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !22, variables: !23)
+!27 = !DISubroutineType(types: !28)
+!28 = !{!3}
+!29 = !DILocalVariable(name: "instance_C", scope: !26, file: !2, line: 20, type: !5)
+!30 = !DIExpression()
+!31 = !DILocation(line: 20, scope: !26)
+!32 = !DILocation(line: 21, scope: !26)
+!33 = !DILocation(line: 22, scope: !26)
+
; PRESENT verifies that static member declarations have these attributes:
; external, declaration, accessibility, and either DW_AT_linkage_name
; (for variables) or DW_AT_const_value (for constants).
@@ -252,4 +264,3 @@
; DARWINA-NOT: DW_AT_const_value
; DARWINA-NOT: DW_AT_location
; DARWINA: NULL
-!34 = !{i32 1, !"Debug Info Version", i32 3}
diff --git a/llvm/test/DebugInfo/X86/debug-loc-frame.ll b/llvm/test/DebugInfo/X86/debug-loc-frame.ll
index f86ea57..d7188a2 100644
--- a/llvm/test/DebugInfo/X86/debug-loc-frame.ll
+++ b/llvm/test/DebugInfo/X86/debug-loc-frame.ll
@@ -42,73 +42,80 @@
; ModuleID = 'frame.c'
source_filename = "frame.c"
-@data = global i32 17, align 4, !dbg !4
+@data = global i32 17, align 4, !dbg !0
@sum = local_unnamed_addr global i32 0, align 4, !dbg !6
-@zero = local_unnamed_addr global i32 0, align 4, !dbg !7
-@ptr = common local_unnamed_addr global i32* null, align 8, !dbg !8
+@zero = local_unnamed_addr global i32 0, align 4, !dbg !9
+@ptr = common local_unnamed_addr global i32* null, align 8, !dbg !11
-; Function Attrs: nounwind uwtable
-define i32 @main() local_unnamed_addr !dbg !13 {
+define i32 @main() local_unnamed_addr !dbg !17 {
entry:
%val = alloca i32, align 4
- %0 = bitcast i32* %val to i8*, !dbg !18
- call void @llvm.lifetime.start(i64 4, i8* %0), !dbg !18
- %1 = load i32, i32* @data, align 4, !dbg !19, !tbaa !20
- tail call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !17, metadata !24), !dbg !25
- store i32 %1, i32* %val, align 4, !dbg !26, !tbaa !20
- tail call void @llvm.dbg.value(metadata i32* %val, i64 0, metadata !17, metadata !27), !dbg !25
- call void @foo(i32 1, i32* nonnull %val), !dbg !28
- call void @foo(i32 2, i32* nonnull @data), !dbg !29
- %2 = load i32, i32* @zero, align 4, !dbg !30, !tbaa !20
- call void @llvm.lifetime.end(i64 4, i8* %0), !dbg !31
- ret i32 %2, !dbg !32
+ %0 = bitcast i32* %val to i8*, !dbg !22
+ call void @llvm.lifetime.start(i64 4, i8* %0), !dbg !22
+ %1 = load i32, i32* @data, align 4, !dbg !23, !tbaa !24
+ tail call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !21, metadata !28), !dbg !29
+ store i32 %1, i32* %val, align 4, !dbg !30, !tbaa !24
+ tail call void @llvm.dbg.value(metadata i32* %val, i64 0, metadata !21, metadata !31), !dbg !29
+ call void @foo(i32 1, i32* nonnull %val), !dbg !32
+ call void @foo(i32 2, i32* nonnull @data), !dbg !33
+ %2 = load i32, i32* @zero, align 4, !dbg !34, !tbaa !24
+ call void @llvm.lifetime.end(i64 4, i8* %0), !dbg !35
+ ret i32 %2, !dbg !36
}
; Function Attrs: argmemonly nounwind
-declare void @llvm.lifetime.start(i64, i8* nocapture)
+declare void @llvm.lifetime.start(i64, i8* nocapture) #0
declare void @foo(i32, i32*) local_unnamed_addr
; Function Attrs: argmemonly nounwind
-declare void @llvm.lifetime.end(i64, i8* nocapture)
+declare void @llvm.lifetime.end(i64, i8* nocapture) #0
; Function Attrs: nounwind readnone
-declare void @llvm.dbg.value(metadata, i64, metadata, metadata)
+declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #1
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!10, !11}
-!llvm.ident = !{!12}
+attributes #0 = { argmemonly nounwind }
+attributes #1 = { nounwind readnone }
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 (trunk 273961)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !3)
-!1 = !DIFile(filename: "frame.c", directory: "/home/user/test")
-!2 = !{}
-!3 = !{!4, !6, !7, !8}
-!4 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "data", scope: !0, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true))
-!5 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!6 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "sum", scope: !0, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true))
-!7 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "zero", scope: !0, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true))
-!8 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "ptr", scope: !0, file: !1, line: 4, type: !9, isLocal: false, isDefinition: true))
-!9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !5, size: 64, align: 64)
-!10 = !{i32 2, !"Dwarf Version", i32 4}
-!11 = !{i32 2, !"Debug Info Version", i32 3}
-!12 = !{!"clang version 3.9.0 (trunk 273961)"}
-!13 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 8, type: !14, isLocal: false, isDefinition: true, scopeLine: 9, isOptimized: true, unit: !0, variables: !16)
-!14 = !DISubroutineType(types: !15)
-!15 = !{!5}
-!16 = !{!17}
-!17 = !DILocalVariable(name: "val", scope: !13, file: !1, line: 10, type: !5)
-!18 = !DILocation(line: 10, column: 3, scope: !13)
-!19 = !DILocation(line: 11, column: 9, scope: !13)
-!20 = !{!21, !21, i64 0}
-!21 = !{!"int", !22, i64 0}
-!22 = !{!"omnipotent char", !23, i64 0}
-!23 = !{!"Simple C/C++ TBAA"}
-!24 = !DIExpression()
-!25 = !DILocation(line: 10, column: 7, scope: !13)
-!26 = !DILocation(line: 11, column: 7, scope: !13)
-!27 = !DIExpression(DW_OP_deref)
-!28 = !DILocation(line: 12, column: 3, scope: !13)
-!29 = !DILocation(line: 13, column: 3, scope: !13)
-!30 = !DILocation(line: 14, column: 10, scope: !13)
-!31 = !DILocation(line: 15, column: 1, scope: !13)
-!32 = !DILocation(line: 14, column: 3, scope: !13)
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!14, !15}
+!llvm.ident = !{!16}
+
+!0 = distinct !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "data", scope: !2, file: !3, line: 1, type: !8, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 3.9.0 (trunk 273961)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
+!3 = !DIFile(filename: "frame.c", directory: "/home/user/test")
+!4 = !{}
+!5 = !{!0, !6, !9, !11}
+!6 = distinct !DIGlobalVariableExpression(var: !7)
+!7 = !DIGlobalVariable(name: "sum", scope: !2, file: !3, line: 2, type: !8, isLocal: false, isDefinition: true)
+!8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!9 = distinct !DIGlobalVariableExpression(var: !10)
+!10 = !DIGlobalVariable(name: "zero", scope: !2, file: !3, line: 3, type: !8, isLocal: false, isDefinition: true)
+!11 = distinct !DIGlobalVariableExpression(var: !12)
+!12 = !DIGlobalVariable(name: "ptr", scope: !2, file: !3, line: 4, type: !13, isLocal: false, isDefinition: true)
+!13 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !8, size: 64, align: 64)
+!14 = !{i32 2, !"Dwarf Version", i32 4}
+!15 = !{i32 2, !"Debug Info Version", i32 3}
+!16 = !{!"clang version 3.9.0 (trunk 273961)"}
+!17 = distinct !DISubprogram(name: "main", scope: !3, file: !3, line: 8, type: !18, isLocal: false, isDefinition: true, scopeLine: 9, isOptimized: true, unit: !2, variables: !20)
+!18 = !DISubroutineType(types: !19)
+!19 = !{!8}
+!20 = !{!21}
+!21 = !DILocalVariable(name: "val", scope: !17, file: !3, line: 10, type: !8)
+!22 = !DILocation(line: 10, column: 3, scope: !17)
+!23 = !DILocation(line: 11, column: 9, scope: !17)
+!24 = !{!25, !25, i64 0}
+!25 = !{!"int", !26, i64 0}
+!26 = !{!"omnipotent char", !27, i64 0}
+!27 = !{!"Simple C/C++ TBAA"}
+!28 = !DIExpression()
+!29 = !DILocation(line: 10, column: 7, scope: !17)
+!30 = !DILocation(line: 11, column: 7, scope: !17)
+!31 = !DIExpression(DW_OP_deref)
+!32 = !DILocation(line: 12, column: 3, scope: !17)
+!33 = !DILocation(line: 13, column: 3, scope: !17)
+!34 = !DILocation(line: 14, column: 10, scope: !17)
+!35 = !DILocation(line: 15, column: 1, scope: !17)
+!36 = !DILocation(line: 14, column: 3, scope: !17)
+
diff --git a/llvm/test/DebugInfo/X86/debugger-tune.ll b/llvm/test/DebugInfo/X86/debugger-tune.ll
index 414ef47..74cb9fe 100644
--- a/llvm/test/DebugInfo/X86/debugger-tune.ll
+++ b/llvm/test/DebugInfo/X86/debugger-tune.ll
@@ -14,7 +14,6 @@
; RUN: llc -mtriple=x86_64-pc-linux -filetype=obj -debugger-tune=lldb < %s | llvm-readobj -sections - | FileCheck --check-prefix=LLDB %s
; RUN: llc -mtriple=x86_64-apple-darwin12 -filetype=obj -debugger-tune=sce < %s | llvm-readobj -sections - | FileCheck --check-prefix=SCE %s
-
; GDB-NOT: apple_names
; GDB: debug_pubnames
; GDB-NOT: apple_names
@@ -26,19 +25,22 @@
; SCE-NOT: debug_pubnames
; SCE-NOT: apple_names
+source_filename = "test/DebugInfo/X86/debugger-tune.ll"
-@globalvar = global i32 0, align 4, !dbg !4
+@globalvar = global i32 0, align 4, !dbg !0
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!6, !7}
-!llvm.ident = !{!8}
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!7, !8}
+!llvm.ident = !{!9}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.7.0 (trunk 238808)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !3, imports: !2)
-!1 = !DIFile(filename: "debugger-tune.cpp", directory: "/home/probinson/projects/scratch")
-!2 = !{}
-!3 = !{!4}
-!4 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "globalvar", scope: !0, file: !1, line: 1, type: !5, isLocal: false, isDefinition: true))
-!5 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!6 = !{i32 2, !"Dwarf Version", i32 4}
-!7 = !{i32 2, !"Debug Info Version", i32 3}
-!8 = !{!"clang version 3.7.0 (trunk 238808)"}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "globalvar", scope: !2, file: !3, line: 1, type: !6, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 3.7.0 (trunk 238808)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !4, globals: !5, imports: !4)
+!3 = !DIFile(filename: "debugger-tune.cpp", directory: "/home/probinson/projects/scratch")
+!4 = !{}
+!5 = !{!0}
+!6 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!7 = !{i32 2, !"Dwarf Version", i32 4}
+!8 = !{i32 2, !"Debug Info Version", i32 3}
+!9 = !{!"clang version 3.7.0 (trunk 238808)"}
+
diff --git a/llvm/test/DebugInfo/X86/decl-derived-member.ll b/llvm/test/DebugInfo/X86/decl-derived-member.ll
index 7bad599..f26a942 100644
--- a/llvm/test/DebugInfo/X86/decl-derived-member.ll
+++ b/llvm/test/DebugInfo/X86/decl-derived-member.ll
@@ -19,6 +19,8 @@
; CHECK: DW_AT_name{{.*}}"b"
; CHECK-NOT: DW_AT_bit_offset
+source_filename = "test/DebugInfo/X86/decl-derived-member.ll"
+
%struct.foo = type { %struct.base }
%struct.base = type { i32 (...)** }
@@ -28,40 +30,40 @@
$_ZN4baseC2Ev = comdat any
-@f = global %struct.foo zeroinitializer, align 8, !dbg !29
+@f = global %struct.foo zeroinitializer, align 8, !dbg !0
@__dso_handle = external global i8
@_ZTV4base = external unnamed_addr constant [4 x i8*]
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_decl_derived_member.cpp, i8* null }]
-define internal void @__cxx_global_var_init() section ".text.startup" !dbg !10 {
+define internal void @__cxx_global_var_init() section ".text.startup" !dbg !15 {
entry:
- call void @_ZN3fooC2Ev(%struct.foo* @f) #2, !dbg !33
- %0 = call i32 @__cxa_atexit(void (i8*)* bitcast (void (%struct.foo*)* @_ZN3fooD2Ev to void (i8*)*), i8* bitcast (%struct.foo* @f to i8*), i8* @__dso_handle) #2, !dbg !33
- ret void, !dbg !33
+ call void @_ZN3fooC2Ev(%struct.foo* @f) #2, !dbg !18
+ %0 = call i32 @__cxa_atexit(void (i8*)* bitcast (void (%struct.foo*)* @_ZN3fooD2Ev to void (i8*)*), i8* bitcast (%struct.foo* @f to i8*), i8* @__dso_handle) #2, !dbg !18
+ ret void, !dbg !18
}
; Function Attrs: inlinehint nounwind uwtable
-define linkonce_odr void @_ZN3fooC2Ev(%struct.foo* %this) unnamed_addr #0 comdat align 2 !dbg !14 {
+define linkonce_odr void @_ZN3fooC2Ev(%struct.foo* %this) unnamed_addr #0 comdat align 2 !dbg !19 {
entry:
%this.addr = alloca %struct.foo*, align 8
store %struct.foo* %this, %struct.foo** %this.addr, align 8
- call void @llvm.dbg.declare(metadata %struct.foo** %this.addr, metadata !34, metadata !36), !dbg !37
+ call void @llvm.dbg.declare(metadata %struct.foo** %this.addr, metadata !24, metadata !26), !dbg !27
%this1 = load %struct.foo*, %struct.foo** %this.addr
- %b = getelementptr inbounds %struct.foo, %struct.foo* %this1, i32 0, i32 0, !dbg !38
- call void @_ZN4baseC2Ev(%struct.base* %b) #2, !dbg !38
- ret void, !dbg !38
+ %b = getelementptr inbounds %struct.foo, %struct.foo* %this1, i32 0, i32 0, !dbg !28
+ call void @_ZN4baseC2Ev(%struct.base* %b) #2, !dbg !28
+ ret void, !dbg !28
}
; Function Attrs: inlinehint uwtable
-define linkonce_odr void @_ZN3fooD2Ev(%struct.foo* %this) unnamed_addr #1 comdat align 2 !dbg !24 {
+define linkonce_odr void @_ZN3fooD2Ev(%struct.foo* %this) unnamed_addr #1 comdat align 2 !dbg !29 {
entry:
%this.addr = alloca %struct.foo*, align 8
store %struct.foo* %this, %struct.foo** %this.addr, align 8
- call void @llvm.dbg.declare(metadata %struct.foo** %this.addr, metadata !39, metadata !36), !dbg !40
+ call void @llvm.dbg.declare(metadata %struct.foo** %this.addr, metadata !31, metadata !26), !dbg !32
%this1 = load %struct.foo*, %struct.foo** %this.addr
- %b = getelementptr inbounds %struct.foo, %struct.foo* %this1, i32 0, i32 0, !dbg !41
- call void @_ZN4baseD1Ev(%struct.base* %b), !dbg !41
- ret void, !dbg !43
+ %b = getelementptr inbounds %struct.foo, %struct.foo* %this1, i32 0, i32 0, !dbg !33
+ call void @_ZN4baseD1Ev(%struct.base* %b), !dbg !33
+ ret void, !dbg !35
}
; Function Attrs: nounwind
@@ -71,22 +73,22 @@
declare void @llvm.dbg.declare(metadata, metadata, metadata) #3
; Function Attrs: inlinehint nounwind uwtable
-define linkonce_odr void @_ZN4baseC2Ev(%struct.base* %this) unnamed_addr #0 comdat align 2 !dbg !19 {
+define linkonce_odr void @_ZN4baseC2Ev(%struct.base* %this) unnamed_addr #0 comdat align 2 !dbg !36 {
entry:
%this.addr = alloca %struct.base*, align 8
store %struct.base* %this, %struct.base** %this.addr, align 8
- call void @llvm.dbg.declare(metadata %struct.base** %this.addr, metadata !44, metadata !36), !dbg !46
+ call void @llvm.dbg.declare(metadata %struct.base** %this.addr, metadata !41, metadata !26), !dbg !43
%this1 = load %struct.base*, %struct.base** %this.addr
- %0 = bitcast %struct.base* %this1 to i32 (...)***, !dbg !47
- store i32 (...)** bitcast (i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @_ZTV4base, i64 0, i64 2) to i32 (...)**), i32 (...)*** %0, !dbg !47
- ret void, !dbg !47
+ %0 = bitcast %struct.base* %this1 to i32 (...)***, !dbg !44
+ store i32 (...)** bitcast (i8** getelementptr inbounds ([4 x i8*], [4 x i8*]* @_ZTV4base, i64 0, i64 2) to i32 (...)**), i32 (...)*** %0, !dbg !44
+ ret void, !dbg !44
}
declare void @_ZN4baseD1Ev(%struct.base*) #4
define internal void @_GLOBAL__sub_I_decl_derived_member.cpp() section ".text.startup" {
entry:
- call void @__cxx_global_var_init(), !dbg !48
+ call void @__cxx_global_var_init(), !dbg !45
ret void
}
@@ -96,55 +98,56 @@
attributes #3 = { nounwind readnone }
attributes #4 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!30, !31}
-!llvm.ident = !{!32}
+!llvm.dbg.cu = !{!8}
+!llvm.module.flags = !{!12, !13}
+!llvm.ident = !{!14}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.7.0 (trunk 227104) (llvm/trunk 227103)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !28, imports: !2)
-!1 = !DIFile(filename: "decl-derived-member.cpp", directory: "/tmp/dbginfo")
-!2 = !{}
-!3 = !{!4, !8}
-!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", line: 5, size: 64, align: 64, file: !1, elements: !5, identifier: "_ZTS3foo")
-!5 = !{!6}
-!6 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 6, size: 64, align: 64, file: !1, scope: !4, baseType: !7)
-!7 = !DIDerivedType(tag: DW_TAG_typedef, name: "base_type", line: 4, file: !1, baseType: !8)
-!8 = !DICompositeType(tag: DW_TAG_structure_type, name: "base", line: 1, flags: DIFlagFwdDecl, file: !1, identifier: "_ZTS4base")
-!10 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 8, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 8, file: !1, scope: !11, type: !12, variables: !2)
-!11 = !DIFile(filename: "decl-derived-member.cpp", directory: "/tmp/dbginfo")
-!12 = !DISubroutineType(types: !13)
-!13 = !{null}
-!14 = distinct !DISubprogram(name: "foo", linkageName: "_ZN3fooC2Ev", line: 5, isLocal: false, isDefinition: true, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !4, type: !15, declaration: !18, variables: !2)
-!15 = !DISubroutineType(types: !16)
-!16 = !{null, !17}
-!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
-!18 = !DISubprogram(name: "foo", isLocal: false, isDefinition: false, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scope: !4, type: !15)
-!19 = distinct !DISubprogram(name: "base", linkageName: "_ZN4baseC2Ev", line: 1, isLocal: false, isDefinition: true, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !8, type: !20, declaration: !23, variables: !2)
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "f", scope: null, file: !2, line: 8, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "decl-derived-member.cpp", directory: "/tmp/dbginfo")
+!3 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", file: !2, line: 5, size: 64, align: 64, elements: !4, identifier: "_ZTS3foo")
+!4 = !{!5}
+!5 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !3, file: !2, line: 6, baseType: !6, size: 64, align: 64)
+!6 = !DIDerivedType(tag: DW_TAG_typedef, name: "base_type", file: !2, line: 4, baseType: !7)
+!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "base", file: !2, line: 1, flags: DIFlagFwdDecl, identifier: "_ZTS4base")
+!8 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.7.0 (trunk 227104) (llvm/trunk 227103)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !9, retainedTypes: !10, globals: !11, imports: !9)
+!9 = !{}
+!10 = !{!3, !7}
+!11 = !{!0}
+!12 = !{i32 2, !"Dwarf Version", i32 4}
+!13 = !{i32 2, !"Debug Info Version", i32 3}
+!14 = !{!"clang version 3.7.0 (trunk 227104) (llvm/trunk 227103)"}
+!15 = distinct !DISubprogram(name: "__cxx_global_var_init", scope: !2, file: !2, line: 8, type: !16, isLocal: true, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !8, variables: !9)
+!16 = !DISubroutineType(types: !17)
+!17 = !{null}
+!18 = !DILocation(line: 8, column: 5, scope: !15)
+!19 = distinct !DISubprogram(name: "foo", linkageName: "_ZN3fooC2Ev", scope: !3, file: !2, line: 5, type: !20, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !8, declaration: !23, variables: !9)
!20 = !DISubroutineType(types: !21)
!21 = !{null, !22}
-!22 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !8)
-!23 = !DISubprogram(name: "base", isLocal: false, isDefinition: false, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scope: !8, type: !20)
-!24 = distinct !DISubprogram(name: "~foo", linkageName: "_ZN3fooD2Ev", line: 5, isLocal: false, isDefinition: true, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !4, type: !15, declaration: !25, variables: !2)
-!25 = !DISubprogram(name: "~foo", isLocal: false, isDefinition: false, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scope: !4, type: !15)
-!26 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__sub_I_decl_derived_member.cpp", isLocal: true, isDefinition: true, flags: DIFlagArtificial, isOptimized: false, unit: !0, file: !1, scope: !11, type: !27, variables: !2)
-!27 = !DISubroutineType(types: !2)
-!28 = !{!29}
-!29 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "f", line: 8, isLocal: false, isDefinition: true, scope: null, file: !11, type: !4))
-!30 = !{i32 2, !"Dwarf Version", i32 4}
-!31 = !{i32 2, !"Debug Info Version", i32 3}
-!32 = !{!"clang version 3.7.0 (trunk 227104) (llvm/trunk 227103)"}
-!33 = !DILocation(line: 8, column: 5, scope: !10)
-!34 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !14, type: !35)
-!35 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)
-!36 = !DIExpression()
-!37 = !DILocation(line: 0, scope: !14)
-!38 = !DILocation(line: 5, column: 8, scope: !14)
-!39 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !24, type: !35)
-!40 = !DILocation(line: 0, scope: !24)
-!41 = !DILocation(line: 5, column: 8, scope: !42)
-!42 = distinct !DILexicalBlock(line: 5, column: 8, file: !1, scope: !24)
-!43 = !DILocation(line: 5, column: 8, scope: !24)
-!44 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !19, type: !45)
-!45 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !8)
-!46 = !DILocation(line: 0, scope: !19)
-!47 = !DILocation(line: 1, column: 8, scope: !19)
-!48 = !DILocation(line: 0, scope: !26)
+!22 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !3, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!23 = !DISubprogram(name: "foo", scope: !3, type: !20, isLocal: false, isDefinition: false, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false)
+!24 = !DILocalVariable(name: "this", arg: 1, scope: !19, type: !25, flags: DIFlagArtificial | DIFlagObjectPointer)
+!25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !3, size: 64, align: 64)
+!26 = !DIExpression()
+!27 = !DILocation(line: 0, scope: !19)
+!28 = !DILocation(line: 5, column: 8, scope: !19)
+!29 = distinct !DISubprogram(name: "~foo", linkageName: "_ZN3fooD2Ev", scope: !3, file: !2, line: 5, type: !20, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !8, declaration: !30, variables: !9)
+!30 = !DISubprogram(name: "~foo", scope: !3, type: !20, isLocal: false, isDefinition: false, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false)
+!31 = !DILocalVariable(name: "this", arg: 1, scope: !29, type: !25, flags: DIFlagArtificial | DIFlagObjectPointer)
+!32 = !DILocation(line: 0, scope: !29)
+!33 = !DILocation(line: 5, column: 8, scope: !34)
+!34 = distinct !DILexicalBlock(scope: !29, file: !2, line: 5, column: 8)
+!35 = !DILocation(line: 5, column: 8, scope: !29)
+!36 = distinct !DISubprogram(name: "base", linkageName: "_ZN4baseC2Ev", scope: !7, file: !2, line: 1, type: !37, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, unit: !8, declaration: !40, variables: !9)
+!37 = !DISubroutineType(types: !38)
+!38 = !{null, !39}
+!39 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!40 = !DISubprogram(name: "base", scope: !7, type: !37, isLocal: false, isDefinition: false, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false)
+!41 = !DILocalVariable(name: "this", arg: 1, scope: !36, type: !42, flags: DIFlagArtificial | DIFlagObjectPointer)
+!42 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64, align: 64)
+!43 = !DILocation(line: 0, scope: !36)
+!44 = !DILocation(line: 1, column: 8, scope: !36)
+!45 = !DILocation(line: 0, scope: !46)
+!46 = distinct !DISubprogram(linkageName: "_GLOBAL__sub_I_decl_derived_member.cpp", scope: !2, file: !2, type: !47, isLocal: true, isDefinition: true, flags: DIFlagArtificial, isOptimized: false, unit: !8, variables: !9)
+!47 = !DISubroutineType(types: !9)
+
diff --git a/llvm/test/DebugInfo/X86/dllimport.ll b/llvm/test/DebugInfo/X86/dllimport.ll
index 493075b..034c826 100644
--- a/llvm/test/DebugInfo/X86/dllimport.ll
+++ b/llvm/test/DebugInfo/X86/dllimport.ll
@@ -2,26 +2,29 @@
; CHECK-NOT: DW_AT_location
+source_filename = "test/DebugInfo/X86/dllimport.ll"
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
target triple = "i686-pc-windows-msvc"
-@"\01?id@?$numpunct@D@@0HA" = available_externally dllimport global i32 0, align 4, !dbg !4
+@"\01?id@?$numpunct@D@@0HA" = available_externally dllimport global i32 0, align 4, !dbg !0
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!13, !14}
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!14, !15}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 (trunk 272628) (llvm/trunk 272566)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !3)
-!1 = !DIFile(filename: "/usr/local/google/home/majnemer/Downloads/<stdin>", directory: "/usr/local/google/home/majnemer/llvm/src")
-!2 = !{}
-!3 = !{!4}
-!4 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "id", linkageName: "\01?id@?$numpunct@D@@0HA", scope: !0, file: !5, line: 4, type: !6, isLocal: false, isDefinition: true, declaration: !7))
-!5 = !DIFile(filename: "/usr/local/google/home/majnemer/Downloads/t.ii", directory: "/usr/local/google/home/majnemer/llvm/src")
-!6 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!7 = !DIDerivedType(tag: DW_TAG_member, name: "id", scope: !8, file: !5, line: 2, baseType: !6, flags: DIFlagStaticMember)
-!8 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "numpunct<char>", file: !5, line: 2, size: 8, align: 8, elements: !9, templateParams: !10)
-!9 = !{!7}
-!10 = !{!11}
-!11 = !DITemplateTypeParameter(type: !12)
-!12 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
-!13 = !{i32 2, !"Dwarf Version", i32 3}
-!14 = !{i32 2, !"Debug Info Version", i32 3}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "id", linkageName: "\01?id@?$numpunct@D@@0HA", scope: !2, file: !6, line: 4, type: !7, isLocal: false, isDefinition: true, declaration: !8)
+!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 3.9.0 (trunk 272628) (llvm/trunk 272566)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
+!3 = !DIFile(filename: "/usr/local/google/home/majnemer/Downloads/<stdin>", directory: "/usr/local/google/home/majnemer/llvm/src")
+!4 = !{}
+!5 = !{!0}
+!6 = !DIFile(filename: "/usr/local/google/home/majnemer/Downloads/t.ii", directory: "/usr/local/google/home/majnemer/llvm/src")
+!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!8 = !DIDerivedType(tag: DW_TAG_member, name: "id", scope: !9, file: !6, line: 2, baseType: !7, flags: DIFlagStaticMember)
+!9 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "numpunct<char>", file: !6, line: 2, size: 8, align: 8, elements: !10, templateParams: !11)
+!10 = !{!8}
+!11 = !{!12}
+!12 = !DITemplateTypeParameter(type: !13)
+!13 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
+!14 = !{i32 2, !"Dwarf Version", i32 3}
+!15 = !{i32 2, !"Debug Info Version", i32 3}
+
diff --git a/llvm/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll b/llvm/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll
index ebe086a..e6105fd 100644
--- a/llvm/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll
+++ b/llvm/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll
@@ -18,36 +18,36 @@
; return foo(2) + foo2(1) + global;
; }
-
; ModuleID = 'tmp/debug_ranges/a.cc'
+source_filename = "test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll"
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
-@global = global i32 2, align 4, !dbg !18
+@global = global i32 2, align 4, !dbg !0
; Function Attrs: nounwind readnone uwtable
-define i32 @_Z3fooi(i32 %bar) #0 !dbg !4 {
+define i32 @_Z3fooi(i32 %bar) #0 !dbg !9 {
entry:
- tail call void @llvm.dbg.value(metadata i32 %bar, i64 0, metadata !10, metadata !DIExpression()), !dbg !20
- ret i32 %bar, !dbg !20
+ tail call void @llvm.dbg.value(metadata i32 %bar, i64 0, metadata !13, metadata !14), !dbg !15
+ ret i32 %bar, !dbg !15
}
; Function Attrs: nounwind readnone uwtable
-define i32 @_Z4foo2i(i32 %bar2) #0 !dbg !11 {
+define i32 @_Z4foo2i(i32 %bar2) #0 !dbg !16 {
entry:
- tail call void @llvm.dbg.value(metadata i32 %bar2, i64 0, metadata !13, metadata !DIExpression()), !dbg !21
- ret i32 %bar2, !dbg !21
+ tail call void @llvm.dbg.value(metadata i32 %bar2, i64 0, metadata !18, metadata !14), !dbg !19
+ ret i32 %bar2, !dbg !19
}
; Function Attrs: nounwind readonly uwtable
-define i32 @main() #1 !dbg !14 {
+define i32 @main() #1 !dbg !20 {
entry:
- %call = tail call i32 @_Z3fooi(i32 2), !dbg !22
- %call1 = tail call i32 @_Z4foo2i(i32 1), !dbg !22
- %add = add nsw i32 %call1, %call, !dbg !22
- %0 = load i32, i32* @global, align 4, !dbg !22, !tbaa !23
- %add2 = add nsw i32 %add, %0, !dbg !22
- ret i32 %add2, !dbg !22
+ %call = tail call i32 @_Z3fooi(i32 2), !dbg !23
+ %call1 = tail call i32 @_Z4foo2i(i32 1), !dbg !23
+ %add = add nsw i32 %call1, %call, !dbg !23
+ %0 = load i32, i32* @global, align 4, !dbg !23, !tbaa !24
+ %add2 = add nsw i32 %add, %0, !dbg !23
+ ret i32 %add2, !dbg !23
}
; Function Attrs: nounwind readnone
@@ -57,32 +57,35 @@
attributes #1 = { nounwind readonly uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #2 = { nounwind readnone }
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!19, !26}
+!llvm.dbg.cu = !{!4}
+!llvm.module.flags = !{!7, !8}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (191881)", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !17, imports: !2)
-!1 = !DIFile(filename: "tmp/debug_ranges/a.cc", directory: "/")
-!2 = !{}
-!4 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2, file: !1, scope: !5, type: !6, variables: !9)
-!5 = !DIFile(filename: "tmp/debug_ranges/a.cc", directory: "/")
-!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 = !{!10}
-!10 = !DILocalVariable(name: "bar", line: 2, arg: 1, scope: !4, file: !5, type: !8)
-!11 = distinct !DISubprogram(name: "foo2", linkageName: "_Z4foo2i", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !12)
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "global", scope: null, file: !2, line: 1, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "tmp/debug_ranges/a.cc", directory: "/")
+!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!4 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.4 (191881)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !5, globals: !6, imports: !5)
+!5 = !{}
+!6 = !{!0}
+!7 = !{i32 2, !"Dwarf Version", i32 4}
+!8 = !{i32 1, !"Debug Info Version", i32 3}
+!9 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi", scope: !2, file: !2, line: 2, type: !10, isLocal: false, isDefinition: true, scopeLine: 2, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !4, variables: !12)
+!10 = !DISubroutineType(types: !11)
+!11 = !{!3, !3}
!12 = !{!13}
-!13 = !DILocalVariable(name: "bar2", line: 3, arg: 1, scope: !11, file: !5, type: !8)
-!14 = distinct !DISubprogram(name: "main", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 5, file: !1, scope: !5, type: !15, variables: !2)
-!15 = !DISubroutineType(types: !16)
-!16 = !{!8}
+!13 = !DILocalVariable(name: "bar", arg: 1, scope: !9, file: !2, line: 2, type: !3)
+!14 = !DIExpression()
+!15 = !DILocation(line: 2, scope: !9)
+!16 = distinct !DISubprogram(name: "foo2", linkageName: "_Z4foo2i", scope: !2, file: !2, line: 3, type: !10, isLocal: false, isDefinition: true, scopeLine: 3, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !4, variables: !17)
!17 = !{!18}
-!18 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "global", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !8))
-!19 = !{i32 2, !"Dwarf Version", i32 4}
-!20 = !DILocation(line: 2, scope: !4)
-!21 = !DILocation(line: 3, scope: !11)
-!22 = !DILocation(line: 6, scope: !14)
-!23 = !{!"int", !24}
-!24 = !{!"omnipotent char", !25}
-!25 = !{!"Simple C/C++ TBAA"}
-!26 = !{i32 1, !"Debug Info Version", i32 3}
+!18 = !DILocalVariable(name: "bar2", arg: 1, scope: !16, file: !2, line: 3, type: !3)
+!19 = !DILocation(line: 3, scope: !16)
+!20 = distinct !DISubprogram(name: "main", scope: !2, file: !2, line: 5, type: !21, isLocal: false, isDefinition: true, scopeLine: 5, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !4, variables: !5)
+!21 = !DISubroutineType(types: !22)
+!22 = !{!3}
+!23 = !DILocation(line: 6, scope: !20)
+!24 = !{!25, !25, i64 0}
+!25 = !{!"int", !26}
+!26 = !{!"omnipotent char", !27}
+!27 = !{!"Simple C/C++ TBAA"}
+
diff --git a/llvm/test/DebugInfo/X86/dwarf-aranges.ll b/llvm/test/DebugInfo/X86/dwarf-aranges.ll
index ce14e3e..210b344 100644
--- a/llvm/test/DebugInfo/X86/dwarf-aranges.ll
+++ b/llvm/test/DebugInfo/X86/dwarf-aranges.ll
@@ -1,6 +1,5 @@
; RUN: llc -generate-arange-section < %s | FileCheck %s
-
; -- header --
; CHECK: .short 2 # DWARF Arange version number
; CHECK-NEXT: .long .Lcu_begin0
@@ -28,8 +27,6 @@
; -- finish --
; CHECK-NEXT: # ARange terminator
-
-
; -- source code --
; Generated from: "clang -c -g -emit-llvm"
;
@@ -42,39 +39,43 @@
; some_bss += some_data + some_other;
; }
+source_filename = "test/DebugInfo/X86/dwarf-aranges.ll"
target triple = "x86_64-unknown-linux-gnu"
-@some_data = global i32 4, align 4, !dbg !9
-@some_other = global i32 5, section "strange+section", align 4, !dbg !11
-@some_bss = common global i32 0, align 4, !dbg !12
+@some_data = global i32 4, align 4, !dbg !0
+@some_other = global i32 5, section "strange+section", align 4, !dbg !4
+@some_bss = common global i32 0, align 4, !dbg !6
-define void @some_code() !dbg !4 {
+define void @some_code() !dbg !13 {
entry:
- %0 = load i32, i32* @some_data, align 4, !dbg !14
- %1 = load i32, i32* @some_other, align 4, !dbg !14
- %add = add nsw i32 %0, %1, !dbg !14
- %2 = load i32, i32* @some_bss, align 4, !dbg !14
- %add1 = add nsw i32 %2, %add, !dbg !14
- store i32 %add1, i32* @some_bss, align 4, !dbg !14
- ret void, !dbg !15
+ %0 = load i32, i32* @some_data, align 4, !dbg !16
+ %1 = load i32, i32* @some_other, align 4, !dbg !16
+ %add = add nsw i32 %0, %1, !dbg !16
+ %2 = load i32, i32* @some_bss, align 4, !dbg !16
+ %add1 = add nsw i32 %2, %add, !dbg !16
+ store i32 %add1, i32* @some_bss, align 4, !dbg !16
+ ret void, !dbg !17
}
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!13, !16}
+!llvm.dbg.cu = !{!8}
+!llvm.module.flags = !{!11, !12}
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !8, imports: !2)
-!1 = !DIFile(filename: "test.c", directory: "/home/kayamon")
-!2 = !{}
-!4 = distinct !DISubprogram(name: "some_code", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !0, scopeLine: 6, file: !1, scope: !5, type: !6, variables: !2)
-!5 = !DIFile(filename: "test.c", directory: "/home/kayamon")
-!6 = !DISubroutineType(types: !7)
-!7 = !{null}
-!8 = !{!9, !11, !12}
-!9 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "some_data", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !10))
-!10 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!11 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "some_other", line: 3, isLocal: false, isDefinition: true, scope: null, file: !5, type: !10))
-!12 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "some_bss", line: 2, isLocal: false, isDefinition: true, scope: null, file: !5, type: !10))
-!13 = !{i32 2, !"Dwarf Version", i32 4}
-!14 = !DILocation(line: 7, scope: !4)
-!15 = !DILocation(line: 8, scope: !4)
-!16 = !{i32 1, !"Debug Info Version", i32 3}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "some_data", scope: null, file: !2, line: 1, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "test.c", directory: "/home/kayamon")
+!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!4 = !DIGlobalVariableExpression(var: !5)
+!5 = !DIGlobalVariable(name: "some_other", scope: null, file: !2, line: 3, type: !3, isLocal: false, isDefinition: true)
+!6 = !DIGlobalVariableExpression(var: !7)
+!7 = !DIGlobalVariable(name: "some_bss", scope: null, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true)
+!8 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 3.4 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !9, retainedTypes: !9, globals: !10, imports: !9)
+!9 = !{}
+!10 = !{!0, !4, !6}
+!11 = !{i32 2, !"Dwarf Version", i32 4}
+!12 = !{i32 1, !"Debug Info Version", i32 3}
+!13 = distinct !DISubprogram(name: "some_code", scope: !2, file: !2, line: 5, type: !14, isLocal: false, isDefinition: true, scopeLine: 6, virtualIndex: 6, isOptimized: false, unit: !8, variables: !9)
+!14 = !DISubroutineType(types: !15)
+!15 = !{null}
+!16 = !DILocation(line: 7, scope: !13)
+!17 = !DILocation(line: 8, scope: !13)
+
diff --git a/llvm/test/DebugInfo/X86/dwarf-linkage-names.ll b/llvm/test/DebugInfo/X86/dwarf-linkage-names.ll
index 11a9141..c736dab 100644
--- a/llvm/test/DebugInfo/X86/dwarf-linkage-names.ll
+++ b/llvm/test/DebugInfo/X86/dwarf-linkage-names.ll
@@ -38,10 +38,12 @@
; NOLINKAGE-NOT: .asciz "_ZN4test10global_varE"
; NOLINKAGE-NOT: .asciz "_ZN4test3barEv"
-@_ZN4test10global_varE = global i32 0, align 4, !dbg !10
+source_filename = "test/DebugInfo/X86/dwarf-linkage-names.ll"
+
+@_ZN4test10global_varE = global i32 0, align 4, !dbg !0
; Function Attrs: nounwind uwtable
-define i32 @_ZN4test3barEv() #0 !dbg !4 {
+define i32 @_ZN4test3barEv() #0 !dbg !11 {
entry:
%0 = load i32, i32* @_ZN4test10global_varE, align 4, !dbg !14
ret i32 %0, !dbg !15
@@ -49,22 +51,24 @@
attributes #0 = { nounwind uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+sse,+sse2" "unsafe-fp-math"="false" "use-soft-float"="false" }
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!11, !12}
-!llvm.ident = !{!13}
+!llvm.dbg.cu = !{!5}
+!llvm.module.flags = !{!8, !9}
+!llvm.ident = !{!10}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.8.0 (trunk 244662)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !9)
-!1 = !DIFile(filename: "dwarf-linkage-names.cpp", directory: "/home/probinson/projects/scratch")
-!2 = !{}
-!4 = distinct !DISubprogram(name: "bar", linkageName: "_ZN4test3barEv", scope: !5, file: !1, line: 3, type: !6, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
-!5 = !DINamespace(name: "test", scope: null, file: !1, line: 1)
-!6 = !DISubroutineType(types: !7)
-!7 = !{!8}
-!8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!9 = !{!10}
-!10 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "global_var", linkageName: "_ZN4test10global_varE", scope: !5, file: !1, line: 2, type: !8, isLocal: false, isDefinition: true))
-!11 = !{i32 2, !"Dwarf Version", i32 4}
-!12 = !{i32 2, !"Debug Info Version", i32 3}
-!13 = !{!"clang version 3.8.0 (trunk 244662)"}
-!14 = !DILocation(line: 3, column: 21, scope: !4)
-!15 = !DILocation(line: 3, column: 14, scope: !4)
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "global_var", linkageName: "_ZN4test10global_varE", scope: !2, file: !3, line: 2, type: !4, isLocal: false, isDefinition: true)
+!2 = !DINamespace(name: "test", scope: null, file: !3, line: 1)
+!3 = !DIFile(filename: "dwarf-linkage-names.cpp", directory: "/home/probinson/projects/scratch")
+!4 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 3.8.0 (trunk 244662)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !6, globals: !7)
+!6 = !{}
+!7 = !{!0}
+!8 = !{i32 2, !"Dwarf Version", i32 4}
+!9 = !{i32 2, !"Debug Info Version", i32 3}
+!10 = !{!"clang version 3.8.0 (trunk 244662)"}
+!11 = distinct !DISubprogram(name: "bar", linkageName: "_ZN4test3barEv", scope: !2, file: !3, line: 3, type: !12, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !5, variables: !6)
+!12 = !DISubroutineType(types: !13)
+!13 = !{!4}
+!14 = !DILocation(line: 3, column: 21, scope: !11)
+!15 = !DILocation(line: 3, column: 14, scope: !11)
+
diff --git a/llvm/test/DebugInfo/X86/dwarf-public-names.ll b/llvm/test/DebugInfo/X86/dwarf-public-names.ll
index 2c2d0ef..e4e6d54 100644
--- a/llvm/test/DebugInfo/X86/dwarf-public-names.ll
+++ b/llvm/test/DebugInfo/X86/dwarf-public-names.ll
@@ -55,82 +55,91 @@
; LINUX-DAG: "C::static_member_variable"
; LINUX-DAG: "C::member_function"
+source_filename = "test/DebugInfo/X86/dwarf-public-names.ll"
+
%struct.C = type { i8 }
-@_ZN1C22static_member_variableE = global i32 0, align 4, !dbg !25
-@global_variable = global %struct.C zeroinitializer, align 1, !dbg !26
-@_ZN2ns25global_namespace_variableE = global i32 1, align 4, !dbg !27
+@_ZN1C22static_member_variableE = global i32 0, align 4, !dbg !0
+@global_variable = global %struct.C zeroinitializer, align 1, !dbg !15
+@_ZN2ns25global_namespace_variableE = global i32 1, align 4, !dbg !17
-define void @_ZN1C15member_functionEv(%struct.C* %this) nounwind uwtable align 2 !dbg !3 {
+; Function Attrs: nounwind uwtable
+define void @_ZN1C15member_functionEv(%struct.C* %this) #0 align 2 !dbg !23 {
entry:
%this.addr = alloca %struct.C*, align 8
store %struct.C* %this, %struct.C** %this.addr, align 8
- call void @llvm.dbg.declare(metadata %struct.C** %this.addr, metadata !28, metadata !DIExpression()), !dbg !30
+ call void @llvm.dbg.declare(metadata %struct.C** %this.addr, metadata !24, metadata !26), !dbg !27
%this1 = load %struct.C*, %struct.C** %this.addr
- store i32 0, i32* @_ZN1C22static_member_variableE, align 4, !dbg !31
- ret void, !dbg !32
+ store i32 0, i32* @_ZN1C22static_member_variableE, align 4, !dbg !28
+ ret void, !dbg !29
}
-declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
+; Function Attrs: nounwind readnone
+declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
-define i32 @_ZN1C22static_member_functionEv() nounwind uwtable align 2 !dbg !18 {
+; Function Attrs: nounwind uwtable
+define i32 @_ZN1C22static_member_functionEv() #0 align 2 !dbg !30 {
entry:
- %0 = load i32, i32* @_ZN1C22static_member_variableE, align 4, !dbg !33
- ret i32 %0, !dbg !33
+ %0 = load i32, i32* @_ZN1C22static_member_variableE, align 4, !dbg !31
+ ret i32 %0, !dbg !31
}
-define i32 @_Z15global_functionv() nounwind uwtable !dbg !19 {
+; Function Attrs: nounwind uwtable
+define i32 @_Z15global_functionv() #0 !dbg !32 {
entry:
- ret i32 -1, !dbg !34
+ ret i32 -1, !dbg !33
}
-define void @_ZN2ns25global_namespace_functionEv() nounwind uwtable !dbg !20 {
+; Function Attrs: nounwind uwtable
+define void @_ZN2ns25global_namespace_functionEv() #0 !dbg !34 {
entry:
- call void @_ZN1C15member_functionEv(%struct.C* @global_variable), !dbg !35
- ret void, !dbg !36
+ call void @_ZN1C15member_functionEv(%struct.C* @global_variable), !dbg !37
+ ret void, !dbg !38
}
attributes #0 = { nounwind uwtable }
attributes #1 = { nounwind readnone }
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!38}
+!llvm.dbg.cu = !{!20}
+!llvm.module.flags = !{!22}
-!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: FullDebug, file: !37, enums: !1, retainedTypes: !1, globals: !24, imports: !1)
-!1 = !{}
-!3 = distinct !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, 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}
-!7 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !8)
-!8 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", line: 1, size: 8, file: !37, elements: !9)
-!9 = !{!10, !12, !14}
-!10 = !DIDerivedType(tag: DW_TAG_member, name: "static_member_variable", line: 4, flags: DIFlagStaticMember, file: !37, scope: !8, baseType: !11)
-!11 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, encoding: DW_ATE_signed)
-!12 = !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !4, scope: !8, type: !5, variables: !13)
-!13 = !{} ; previously: invalid DW_TAG_base_type
-!14 = !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", line: 3, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 3, file: !4, scope: !8, type: !15, variables: !17)
-!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, unit: !0, 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, unit: !0, 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, unit: !0, 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}
-!24 = !{!25, !26, !27}
-!25 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "static_member_variable", linkageName: "_ZN1C22static_member_variableE", line: 7, isLocal: false, isDefinition: true, scope: !8, file: !4, type: !11, declaration: !10))
-!26 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "global_variable", line: 17, isLocal: false, isDefinition: true, scope: null, file: !4, type: !8))
-!27 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "global_namespace_variable", linkageName: "_ZN2ns25global_namespace_variableE", line: 27, isLocal: false, isDefinition: true, scope: !21, file: !4, type: !11))
-!28 = !DILocalVariable(name: "this", line: 9, arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !3, file: !4, type: !29)
-!29 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, baseType: !8)
-!30 = !DILocation(line: 9, scope: !3)
-!31 = !DILocation(line: 10, scope: !3)
-!32 = !DILocation(line: 11, scope: !3)
-!33 = !DILocation(line: 14, scope: !18)
-!34 = !DILocation(line: 20, scope: !19)
-!35 = !DILocation(line: 25, scope: !20)
-!36 = !DILocation(line: 26, scope: !20)
-!37 = !DIFile(filename: "dwarf-public-names.cpp", directory: "/usr2/kparzysz/s.hex/t")
-!38 = !{i32 1, !"Debug Info Version", i32 3}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "static_member_variable", linkageName: "_ZN1C22static_member_variableE", scope: !2, file: !3, line: 7, type: !6, isLocal: false, isDefinition: true, declaration: !5)
+!2 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", file: !3, line: 1, size: 8, elements: !4)
+!3 = !DIFile(filename: "dwarf-public-names.cpp", directory: "/usr2/kparzysz/s.hex/t")
+!4 = !{!5, !7, !12}
+!5 = !DIDerivedType(tag: DW_TAG_member, name: "static_member_variable", scope: !2, file: !3, line: 4, baseType: !6, flags: DIFlagStaticMember)
+!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+!7 = !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !2, file: !3, line: 2, type: !8, isLocal: false, isDefinition: false, scopeLine: 2, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, variables: !11)
+!8 = !DISubroutineType(types: !9)
+!9 = !{null, !10}
+!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !2, size: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!11 = !{}
+!12 = !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !2, file: !3, line: 3, type: !13, isLocal: false, isDefinition: false, scopeLine: 3, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, variables: !11)
+!13 = !DISubroutineType(types: !14)
+!14 = !{!6}
+!15 = !DIGlobalVariableExpression(var: !16)
+!16 = !DIGlobalVariable(name: "global_variable", scope: null, file: !3, line: 17, type: !2, isLocal: false, isDefinition: true) ; previously: invalid DW_TAG_base_type
+!17 = !DIGlobalVariableExpression(var: !18)
+!18 = !DIGlobalVariable(name: "global_namespace_variable", linkageName: "_ZN2ns25global_namespace_variableE", scope: !19, file: !3, line: 27, type: !6, isLocal: false, isDefinition: true)
+!19 = !DINamespace(name: "ns", scope: null, file: !3, line: 23)
+!20 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 3.3 (http://llvm.org/git/clang.git a09cd8103a6a719cb2628cdf0c91682250a17bd2) (http://llvm.org/git/llvm.git 47d03cec0afca0c01ae42b82916d1d731716cd20)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !11, retainedTypes: !11, globals: !21, imports: !11) ; previously: invalid DW_TAG_base_type
+!21 = !{!0, !15, !17}
+!22 = !{i32 1, !"Debug Info Version", i32 3}
+!23 = distinct !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: null, file: !3, line: 9, type: !8, isLocal: false, isDefinition: true, scopeLine: 9, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !20, declaration: !7, variables: !11)
+!24 = !DILocalVariable(name: "this", arg: 1, scope: !23, file: !3, line: 9, type: !25, flags: DIFlagArtificial | DIFlagObjectPointer)
+!25 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !2, size: 64)
+!26 = !DIExpression()
+!27 = !DILocation(line: 9, scope: !23)
+!28 = !DILocation(line: 10, scope: !23)
+!29 = !DILocation(line: 11, scope: !23)
+!30 = distinct !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: null, file: !3, line: 13, type: !13, isLocal: false, isDefinition: true, scopeLine: 13, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !20, declaration: !12, variables: !11)
+!31 = !DILocation(line: 14, scope: !30)
+!32 = distinct !DISubprogram(name: "global_function", linkageName: "_Z15global_functionv", scope: !3, file: !3, line: 19, type: !13, isLocal: false, isDefinition: true, scopeLine: 19, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !20, variables: !11)
+!33 = !DILocation(line: 20, scope: !32)
+!34 = distinct !DISubprogram(name: "global_namespace_function", linkageName: "_ZN2ns25global_namespace_functionEv", scope: !19, file: !3, line: 24, type: !35, isLocal: false, isDefinition: true, scopeLine: 24, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !20, variables: !11)
+!35 = !DISubroutineType(types: !36)
+!36 = !{null}
+!37 = !DILocation(line: 25, scope: !34)
+!38 = !DILocation(line: 26, scope: !34)
+
diff --git a/llvm/test/DebugInfo/X86/empty-array.ll b/llvm/test/DebugInfo/X86/empty-array.ll
index c65a379..703773b 100644
--- a/llvm/test/DebugInfo/X86/empty-array.ll
+++ b/llvm/test/DebugInfo/X86/empty-array.ll
@@ -2,10 +2,11 @@
; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
; <rdar://problem/12566646>
+source_filename = "test/DebugInfo/X86/empty-array.ll"
+
%class.A = type { [0 x i32] }
-@a = global %class.A zeroinitializer, align 4, !dbg !5
-
+@a = global %class.A zeroinitializer, align 4, !dbg !0
; CHECK: DW_TAG_class_type
; CHECK: DW_TAG_member
; CHECK-NEXT: DW_AT_name [DW_FORM_strp] ( .debug_str[0x{{[0-9a-f]*}}] = "x")
@@ -24,24 +25,25 @@
; CHECK-NEXT: DW_AT_byte_size [DW_FORM_data1] (0x08)
; CHECK-NEXT: DW_AT_encoding [DW_FORM_data1] (DW_ATE_unsigned)
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!21}
+!llvm.dbg.cu = !{!14}
+!llvm.module.flags = !{!17}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 169136)", isOptimized: false, emissionKind: FullDebug, file: !20, enums: !1, retainedTypes: !1, globals: !3, imports: !1)
-!1 = !{}
-!3 = !{!5}
-!5 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7))
-!6 = !DIFile(filename: "t.cpp", directory: "/Volumes/Sandbox/llvm")
-!7 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 1, align: 32, file: !20, elements: !8)
-!8 = !{!9, !14}
-!9 = !DIDerivedType(tag: DW_TAG_member, name: "x", line: 1, flags: DIFlagPrivate, file: !20, scope: !7, baseType: !10)
-!10 = !DICompositeType(tag: DW_TAG_array_type, align: 32, baseType: !11, elements: !12)
-!11 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!12 = !{!13}
-!13 = !DISubrange(count: -1)
-!14 = !DISubprogram(name: "A", line: 1, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !6, scope: !7, type: !15)
-!15 = !DISubroutineType(types: !16)
-!16 = !{null, !17}
-!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !7)
-!20 = !DIFile(filename: "t.cpp", directory: "/Volumes/Sandbox/llvm")
-!21 = !{i32 1, !"Debug Info Version", i32 3}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "a", scope: null, file: !2, line: 1, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "t.cpp", directory: "/Volumes/Sandbox/llvm")
+!3 = !DICompositeType(tag: DW_TAG_class_type, name: "A", file: !2, line: 1, align: 32, elements: !4)
+!4 = !{!5, !10}
+!5 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !3, file: !2, line: 1, baseType: !6, flags: DIFlagPrivate)
+!6 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, align: 32, elements: !8)
+!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!8 = !{!9}
+!9 = !DISubrange(count: -1)
+!10 = !DISubprogram(name: "A", scope: !3, file: !2, line: 1, type: !11, isLocal: false, isDefinition: false, scopeLine: 1, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false)
+!11 = !DISubroutineType(types: !12)
+!12 = !{null, !13}
+!13 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !3, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!14 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.3 (trunk 169136)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !15, retainedTypes: !15, globals: !16, imports: !15)
+!15 = !{}
+!16 = !{!0}
+!17 = !{i32 1, !"Debug Info Version", i32 3}
+
diff --git a/llvm/test/DebugInfo/X86/enum-class.ll b/llvm/test/DebugInfo/X86/enum-class.ll
index 31e405f..15699a2 100644
--- a/llvm/test/DebugInfo/X86/enum-class.ll
+++ b/llvm/test/DebugInfo/X86/enum-class.ll
@@ -1,33 +1,38 @@
; RUN: llc -O0 -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj
; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
-@a = global i32 0, align 4, !dbg !19
-@b = global i64 0, align 8, !dbg !20
-@c = global i32 0, align 4, !dbg !21
+source_filename = "test/DebugInfo/X86/enum-class.ll"
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!23}
+@a = global i32 0, align 4, !dbg !0
+@b = global i64 0, align 8, !dbg !7
+@c = global i32 0, align 4, !dbg !13
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 (trunk 157269) (llvm/trunk 157264)", isOptimized: false, emissionKind: FullDebug, file: !22, enums: !1, retainedTypes: !15, globals: !17, imports: !15)
-!1 = !{!3, !8, !12}
-!3 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "A", line: 1, size: 32, align: 32, file: !4, baseType: !5, elements: !6)
-!4 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo/tmp")
-!5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!6 = !{!7}
-!7 = !DIEnumerator(name: "A1", value: 1) ; [ DW_TAG_enumerator ]
-!8 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "B", line: 2, size: 64, align: 64, file: !4, baseType: !9, elements: !10)
-!9 = !DIBasicType(tag: DW_TAG_base_type, name: "long unsigned int", size: 64, align: 64, encoding: DW_ATE_unsigned)
-!10 = !{!11}
-!11 = !DIEnumerator(name: "B1", value: 1) ; [ DW_TAG_enumerator ]
-!12 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "C", line: 3, size: 32, align: 32, file: !4, elements: !13)
-!13 = !{!14}
-!14 = !DIEnumerator(name: "C1", value: 1) ; [ DW_TAG_enumerator ]
-!15 = !{}
-!17 = !{!19, !20, !21}
-!19 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", line: 4, isLocal: false, isDefinition: true, scope: null, file: !4, type: !3))
-!20 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "b", line: 5, isLocal: false, isDefinition: true, scope: null, file: !4, type: !8))
-!21 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "c", line: 6, isLocal: false, isDefinition: true, scope: null, file: !4, type: !12))
-!22 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo/tmp")
+!llvm.dbg.cu = !{!18}
+!llvm.module.flags = !{!22}
+
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "a", scope: null, file: !2, line: 4, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo/tmp")
+!3 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "A", file: !2, line: 1, baseType: !4, size: 32, align: 32, elements: !5)
+!4 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!5 = !{!6}
+!6 = !DIEnumerator(name: "A1", value: 1)
+!7 = !DIGlobalVariableExpression(var: !8) ; [ DW_TAG_enumerator ]
+!8 = !DIGlobalVariable(name: "b", scope: null, file: !2, line: 5, type: !9, isLocal: false, isDefinition: true)
+!9 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "B", file: !2, line: 2, baseType: !10, size: 64, align: 64, elements: !11)
+!10 = !DIBasicType(name: "long unsigned int", size: 64, align: 64, encoding: DW_ATE_unsigned)
+!11 = !{!12}
+!12 = !DIEnumerator(name: "B1", value: 1) ; [ DW_TAG_enumerator ]
+!13 = !DIGlobalVariableExpression(var: !14)
+!14 = !DIGlobalVariable(name: "c", scope: null, file: !2, line: 6, type: !15, isLocal: false, isDefinition: true)
+!15 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "C", file: !2, line: 3, size: 32, align: 32, elements: !16)
+!16 = !{!17}
+!17 = !DIEnumerator(name: "C1", value: 1) ; [ DW_TAG_enumerator ]
+!18 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.2 (trunk 157269) (llvm/trunk 157264)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !19, retainedTypes: !20, globals: !21, imports: !20)
+!19 = !{!3, !9, !15}
+!20 = !{}
+!21 = !{!0, !7, !13}
+!22 = !{i32 1, !"Debug Info Version", i32 3}
; CHECK: DW_TAG_enumeration_type [{{.*}}]
; CHECK: DW_AT_type [DW_FORM_ref4]
@@ -42,4 +47,3 @@
; CHECK: DW_TAG_enumeration_type [6]
; CHECK-NOT: DW_AT_enum_class
; CHECK: DW_AT_name [DW_FORM_strp] ( .debug_str[{{.*}}] = "C")
-!23 = !{i32 1, !"Debug Info Version", i32 3}
diff --git a/llvm/test/DebugInfo/X86/enum-fwd-decl.ll b/llvm/test/DebugInfo/X86/enum-fwd-decl.ll
index ff3d1e4..4c56fd1 100644
--- a/llvm/test/DebugInfo/X86/enum-fwd-decl.ll
+++ b/llvm/test/DebugInfo/X86/enum-fwd-decl.ll
@@ -1,21 +1,22 @@
; RUN: llc -O0 -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj
; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
-@e = global i16 0, align 2, !dbg !5
+source_filename = "test/DebugInfo/X86/enum-fwd-decl.ll"
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!9}
+@e = global i16 0, align 2, !dbg !0
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.2 (trunk 165274) (llvm/trunk 165272)", isOptimized: false, emissionKind: FullDebug, file: !8, enums: !1, retainedTypes: !1, globals: !3, imports: !1)
-!1 = !{}
-!3 = !{!5}
-!5 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "e", line: 2, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7))
-!6 = !DIFile(filename: "foo.cpp", directory: "/tmp")
-!7 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E", line: 1, size: 16, align: 16, flags: DIFlagFwdDecl, file: !8)
-!8 = !DIFile(filename: "foo.cpp", directory: "/tmp")
+!llvm.dbg.cu = !{!4}
+!llvm.module.flags = !{!7}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "e", scope: null, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "foo.cpp", directory: "/tmp")
+!3 = !DICompositeType(tag: DW_TAG_enumeration_type, name: "E", file: !2, line: 1, size: 16, align: 16, flags: DIFlagFwdDecl)
+!4 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.2 (trunk 165274) (llvm/trunk 165272)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !5, globals: !6, imports: !5)
+!5 = !{}
; CHECK: DW_TAG_enumeration_type
; CHECK-NEXT: DW_AT_name
; CHECK-NEXT: DW_AT_byte_size
; CHECK-NEXT: DW_AT_declaration
-!9 = !{i32 1, !"Debug Info Version", i32 3}
+!6 = !{!0}
+!7 = !{i32 1, !"Debug Info Version", i32 3}
diff --git a/llvm/test/DebugInfo/X86/externaltyperef.ll b/llvm/test/DebugInfo/X86/externaltyperef.ll
index 0049a26..4cd7f8c 100644
--- a/llvm/test/DebugInfo/X86/externaltyperef.ll
+++ b/llvm/test/DebugInfo/X86/externaltyperef.ll
@@ -21,31 +21,32 @@
; CHECK: DW_TAG_imported_declaration
; CHECK: DW_AT_import [DW_FORM_ref4] {{.*}}[[B]]
+source_filename = "test/DebugInfo/X86/externaltyperef.ll"
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.10.0"
%class.A = type opaque
-@a = global %class.A* null, align 8, !dbg !6
+@a = global %class.A* null, align 8, !dbg !0
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!13, !14, !15}
-!llvm.ident = !{!16}
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!12, !13, !14}
+!llvm.ident = !{!15}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.7.0 (trunk 242039) (llvm/trunk 242046)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, globals: !5, imports: !11)
-!1 = !DIFile(filename: "test.cpp", directory: "/")
-!2 = !{}
-!3 = !{!4, !9}
-!4 = !DICompositeType(tag: DW_TAG_class_type, name: "A", file: !1, flags: DIFlagExternalTypeRef, identifier: "_ZTS1A")
-!5 = !{!6}
-!6 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", scope: !0, file: !1, line: 2, type: !7, isLocal: false, isDefinition: true))
-!7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64)
-!8 = !DICompositeType(tag: DW_TAG_class_type, name: "B", file: !1, flags: DIFlagExternalTypeRef, identifier: "_ZTS1B")
-!9 = !DICompositeType(tag: DW_TAG_class_type, name: "A", file: !1, flags: DIFlagExternalTypeRef, identifier: "_ZTSN1N1BE")
-!10 = !DINamespace(name: "N", scope: null, file: !1, line: 1)
-!11 = !{!12}
-!12 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !0, entity: !9, line: 4)
-!13 = !{i32 2, !"Dwarf Version", i32 2}
-!14 = !{i32 2, !"Debug Info Version", i32 3}
-!15 = !{i32 1, !"PIC Level", i32 2}
-!16 = !{!"clang version 3.7.0 (trunk 242039) (llvm/trunk 242046)"}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "a", scope: !2, file: !3, line: 2, type: !11, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 3.7.0 (trunk 242039) (llvm/trunk 242046)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !5, globals: !8, imports: !9)
+!3 = !DIFile(filename: "test.cpp", directory: "/")
+!4 = !{}
+!5 = !{!6, !7}
+!6 = !DICompositeType(tag: DW_TAG_class_type, name: "A", file: !3, flags: DIFlagExternalTypeRef, identifier: "_ZTS1A")
+!7 = !DICompositeType(tag: DW_TAG_class_type, name: "A", file: !3, flags: DIFlagExternalTypeRef, identifier: "_ZTSN1N1BE")
+!8 = !{!0}
+!9 = !{!10}
+!10 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !7, line: 4)
+!11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 64, align: 64)
+!12 = !{i32 2, !"Dwarf Version", i32 2}
+!13 = !{i32 2, !"Debug Info Version", i32 3}
+!14 = !{i32 1, !"PIC Level", i32 2}
+!15 = !{!"clang version 3.7.0 (trunk 242039) (llvm/trunk 242046)"}
+
diff --git a/llvm/test/DebugInfo/X86/fission-cu.ll b/llvm/test/DebugInfo/X86/fission-cu.ll
index c697325..1ca2372 100644
--- a/llvm/test/DebugInfo/X86/fission-cu.ll
+++ b/llvm/test/DebugInfo/X86/fission-cu.ll
@@ -3,19 +3,19 @@
; RUN: llvm-readobj --relocations %t | FileCheck --check-prefix=OBJ %s
; RUN: llvm-objdump -h %t | FileCheck --check-prefix=HDR %s
-@a = common global i32 0, align 4, !dbg !5
+source_filename = "test/DebugInfo/X86/fission-cu.ll"
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!9}
+@a = common global i32 0, align 4, !dbg !0
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 (trunk 169021) (llvm/trunk 169020)", isOptimized: false, splitDebugFilename: "baz.dwo", emissionKind: FullDebug, file: !8, enums: !1, retainedTypes: !1, globals: !3, imports: !1)
-!1 = !{}
-!3 = !{!5}
-!5 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7))
-!6 = !DIFile(filename: "baz.c", directory: "/usr/local/google/home/echristo/tmp")
-!7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!8 = !DIFile(filename: "baz.c", directory: "/usr/local/google/home/echristo/tmp")
+!llvm.dbg.cu = !{!4}
+!llvm.module.flags = !{!7}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "a", scope: null, file: !2, line: 1, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "baz.c", directory: "/usr/local/google/home/echristo/tmp")
+!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!4 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 3.3 (trunk 169021) (llvm/trunk 169020)", isOptimized: false, runtimeVersion: 0, splitDebugFilename: "baz.dwo", emissionKind: FullDebug, enums: !5, retainedTypes: !5, globals: !6, imports: !5)
+!5 = !{}
; Check that the skeleton compile unit contains the proper attributes:
; This DIE has the following attributes: DW_AT_comp_dir, DW_AT_stmt_list,
; DW_AT_low_pc, DW_AT_high_pc, DW_AT_ranges, DW_AT_dwo_name, DW_AT_dwo_id,
@@ -115,4 +115,5 @@
; HDR-NOT: .debug_aranges
; HDR-NOT: .rela.{{.*}}.dwo
-!9 = !{i32 1, !"Debug Info Version", i32 3}
+!6 = !{!0}
+!7 = !{i32 1, !"Debug Info Version", i32 3}
diff --git a/llvm/test/DebugInfo/X86/generate-odr-hash.ll b/llvm/test/DebugInfo/X86/generate-odr-hash.ll
index c7e1780..7b3a291 100644
--- a/llvm/test/DebugInfo/X86/generate-odr-hash.ll
+++ b/llvm/test/DebugInfo/X86/generate-odr-hash.ll
@@ -69,7 +69,6 @@
; CHECK-NEXT: DW_AT_decl_file
; CHECK-NEXT: DW_AT_decl_line
-
; CHECK: [[WOMBAT:^0x........]]: DW_TAG_structure_type
; CHECK-NEXT: DW_AT_declaration
; CHECK-NEXT: DW_AT_signature {{.*}} (0xfd756cee88f8a118)
@@ -85,7 +84,6 @@
; FISSION-NEXT: DW_AT_name {{.*}} ( indexed {{.*}} "bar"
; SINGLE-NEXT: DW_AT_name {{.*}} "bar"
-
; Check that we generate a hash for fluffy and the value.
; CHECK-NOT: type_signature
; CHECK-LABEL: type_signature = 0xb04af47397402e77
@@ -166,6 +164,8 @@
; OBJ_FISSION-NOT: SHF_GROUP
; OBJ_FISSION: }
+source_filename = "test/DebugInfo/X86/generate-odr-hash.ll"
+
%struct.bar = type { i8 }
%"class.echidna::capybara::mongoose::fluffy" = type { i32, i32 }
%"struct.<anonymous namespace>::walrus" = type { i8 }
@@ -173,103 +173,108 @@
%struct.anon = type { i32, i32 }
%struct.baz = type { i8 }
-@b = global %struct.bar zeroinitializer, align 1, !dbg !39
-@_ZN7echidna8capybara8mongoose6animalE = global %"class.echidna::capybara::mongoose::fluffy" zeroinitializer, align 4, !dbg !40
-@w = internal global %"struct.<anonymous namespace>::walrus" zeroinitializer, align 1, !dbg !41
-@wom = global %struct.wombat zeroinitializer, align 4, !dbg !42
+@b = global %struct.bar zeroinitializer, align 1, !dbg !0
+@_ZN7echidna8capybara8mongoose6animalE = global %"class.echidna::capybara::mongoose::fluffy" zeroinitializer, align 4, !dbg !6
+@w = internal global %"struct.<anonymous namespace>::walrus" zeroinitializer, align 1, !dbg !16
+@wom = global %struct.wombat zeroinitializer, align 4, !dbg !25
@llvm.global_ctors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 65535, void ()* @_GLOBAL__I_a }]
; Function Attrs: nounwind uwtable
-define void @_Z3foov() #0 !dbg !22 {
+define void @_Z3foov() #0 !dbg !40 {
entry:
%b = alloca %struct.baz, align 1
- call void @llvm.dbg.declare(metadata %struct.baz* %b, metadata !46, metadata !DIExpression()), !dbg !48
- ret void, !dbg !49
+ call void @llvm.dbg.declare(metadata %struct.baz* %b, metadata !43, metadata !45), !dbg !46
+ ret void, !dbg !47
}
; Function Attrs: nounwind readnone
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
-define internal void @__cxx_global_var_init() section ".text.startup" !dbg !26 {
+define internal void @__cxx_global_var_init() section ".text.startup" !dbg !48 {
entry:
- call void @_ZN12_GLOBAL__N_16walrusC2Ev(%"struct.<anonymous namespace>::walrus"* @w), !dbg !50
- ret void, !dbg !50
+ call void @_ZN12_GLOBAL__N_16walrusC2Ev(%"struct.<anonymous namespace>::walrus"* @w), !dbg !49
+ ret void, !dbg !49
}
; Function Attrs: nounwind uwtable
-define internal void @_ZN12_GLOBAL__N_16walrusC2Ev(%"struct.<anonymous namespace>::walrus"* %this) unnamed_addr #0 align 2 !dbg !27 {
+define internal void @_ZN12_GLOBAL__N_16walrusC2Ev(%"struct.<anonymous namespace>::walrus"* %this) unnamed_addr #0 align 2 !dbg !50 {
entry:
%this.addr = alloca %"struct.<anonymous namespace>::walrus"*, align 8
store %"struct.<anonymous namespace>::walrus"* %this, %"struct.<anonymous namespace>::walrus"** %this.addr, align 8
- call void @llvm.dbg.declare(metadata %"struct.<anonymous namespace>::walrus"** %this.addr, metadata !51, metadata !DIExpression()), !dbg !53
+ call void @llvm.dbg.declare(metadata %"struct.<anonymous namespace>::walrus"** %this.addr, metadata !51, metadata !45), !dbg !53
%this1 = load %"struct.<anonymous namespace>::walrus"*, %"struct.<anonymous namespace>::walrus"** %this.addr
ret void, !dbg !54
}
-define internal void @_GLOBAL__I_a() section ".text.startup" !dbg !36 {
+define internal void @_GLOBAL__I_a() section ".text.startup" !dbg !55 {
entry:
- call void @__cxx_global_var_init(), !dbg !55
- ret void, !dbg !55
+ call void @__cxx_global_var_init(), !dbg !57
+ ret void, !dbg !57
}
attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { nounwind readnone }
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!43, !44}
-!llvm.ident = !{!45}
+!llvm.dbg.cu = !{!34}
+!llvm.module.flags = !{!37, !38}
+!llvm.ident = !{!39}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, splitDebugFilename: "bar.dwo", emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !38, imports: !2)
-!1 = !DIFile(filename: "bar.cpp", directory: "/tmp/dbginfo")
-!2 = !{}
-!3 = !{!4, !6, !14, !17}
-!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "bar", line: 1, size: 8, align: 8, file: !5, elements: !2, identifier: "_ZTS3bar")
-!5 = !DIFile(filename: "bar.h", directory: "/tmp/dbginfo")
-!6 = !DICompositeType(tag: DW_TAG_class_type, name: "fluffy", line: 13, size: 64, align: 32, file: !1, scope: !7, elements: !10, identifier: "_ZTSN7echidna8capybara8mongoose6fluffyE")
-!7 = !DINamespace(name: "mongoose", line: 12, file: !1, scope: !8)
-!8 = !DINamespace(name: "capybara", line: 11, file: !1, scope: !9)
-!9 = !DINamespace(name: "echidna", line: 10, file: !1, scope: null)
-!10 = !{!11, !13}
-!11 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 14, size: 32, align: 32, flags: DIFlagPrivate, file: !1, scope: !6, baseType: !12)
-!12 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!13 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 15, size: 32, align: 32, offset: 32, flags: DIFlagPrivate, file: !1, scope: !6, baseType: !12)
-!14 = !DICompositeType(tag: DW_TAG_structure_type, name: "wombat", line: 31, size: 64, align: 32, file: !1, elements: !15, identifier: "_ZTS6wombat")
-!15 = !{!16}
-!16 = !DIDerivedType(tag: DW_TAG_member, name: "a_b", line: 35, size: 64, align: 32, file: !1, scope: !14, baseType: !17)
-!17 = !DICompositeType(tag: DW_TAG_structure_type, line: 32, size: 64, align: 32, file: !1, scope: !14, elements: !18, identifier: "_ZTSN6wombatUt_E")
-!18 = !{!19, !20}
-!19 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 33, size: 32, align: 32, file: !1, scope: !17, baseType: !12)
-!20 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 34, size: 32, align: 32, offset: 32, file: !1, scope: !17, baseType: !12)
-!22 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !23, type: !24, variables: !2)
-!23 = !DIFile(filename: "bar.cpp", directory: "/tmp/dbginfo")
-!24 = !DISubroutineType(types: !25)
-!25 = !{null}
-!26 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 29, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 29, file: !1, scope: !23, type: !24, variables: !2)
-!27 = distinct !DISubprogram(name: "walrus", linkageName: "_ZN12_GLOBAL__N_16walrusC2Ev", line: 25, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 25, file: !1, scope: !28, type: !32, declaration: !31, variables: !2)
-!28 = !DICompositeType(tag: DW_TAG_structure_type, name: "walrus", line: 24, size: 8, align: 8, file: !1, scope: !29, elements: !30)
-!29 = !DINamespace(line: 23, file: !1, scope: null)
-!30 = !{!31}
-!31 = !DISubprogram(name: "walrus", line: 25, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 25, file: !1, scope: !28, type: !32)
-!32 = !DISubroutineType(types: !33)
-!33 = !{null, !34}
-!34 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !28)
-!36 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__I_a", line: 25, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagArtificial, isOptimized: false, unit: !0, scopeLine: 25, file: !1, scope: !23, type: !37, variables: !2)
-!37 = !DISubroutineType(types: !2)
-!38 = !{!39, !40, !41, !42}
-!39 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "b", line: 3, isLocal: false, isDefinition: true, scope: null, file: !23, type: !4))
-!40 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "animal", linkageName: "_ZN7echidna8capybara8mongoose6animalE", line: 18, isLocal: false, isDefinition: true, scope: !7, file: !23, type: !6))
-!41 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "w", line: 29, isLocal: true, isDefinition: true, scope: null, file: !23, type: !28))
-!42 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "wom", line: 38, isLocal: false, isDefinition: true, scope: null, file: !23, type: !14))
-!43 = !{i32 2, !"Dwarf Version", i32 4}
-!44 = !{i32 1, !"Debug Info Version", i32 3}
-!45 = !{!"clang version 3.5 "}
-!46 = !DILocalVariable(name: "b", line: 7, scope: !22, file: !23, type: !47)
-!47 = !DICompositeType(tag: DW_TAG_structure_type, name: "baz", line: 6, size: 8, align: 8, file: !1, scope: !22, elements: !2)
-!48 = !DILocation(line: 7, scope: !22)
-!49 = !DILocation(line: 8, scope: !22)
-!50 = !DILocation(line: 29, scope: !26)
-!51 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !27, type: !52)
-!52 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !28)
-!53 = !DILocation(line: 0, scope: !27)
-!54 = !DILocation(line: 25, scope: !27)
-!55 = !DILocation(line: 25, scope: !36)
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "b", scope: null, file: !2, line: 3, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "bar.cpp", directory: "/tmp/dbginfo")
+!3 = !DICompositeType(tag: DW_TAG_structure_type, name: "bar", file: !4, line: 1, size: 8, align: 8, elements: !5, identifier: "_ZTS3bar")
+!4 = !DIFile(filename: "bar.h", directory: "/tmp/dbginfo")
+!5 = !{}
+!6 = !DIGlobalVariableExpression(var: !7)
+!7 = !DIGlobalVariable(name: "animal", linkageName: "_ZN7echidna8capybara8mongoose6animalE", scope: !8, file: !2, line: 18, type: !11, isLocal: false, isDefinition: true)
+!8 = !DINamespace(name: "mongoose", scope: !9, file: !2, line: 12)
+!9 = !DINamespace(name: "capybara", scope: !10, file: !2, line: 11)
+!10 = !DINamespace(name: "echidna", scope: null, file: !2, line: 10)
+!11 = !DICompositeType(tag: DW_TAG_class_type, name: "fluffy", scope: !8, file: !2, line: 13, size: 64, align: 32, elements: !12, identifier: "_ZTSN7echidna8capybara8mongoose6fluffyE")
+!12 = !{!13, !15}
+!13 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !11, file: !2, line: 14, baseType: !14, size: 32, align: 32, flags: DIFlagPrivate)
+!14 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!15 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !11, file: !2, line: 15, baseType: !14, size: 32, align: 32, offset: 32, flags: DIFlagPrivate)
+!16 = !DIGlobalVariableExpression(var: !17)
+!17 = !DIGlobalVariable(name: "w", scope: null, file: !2, line: 29, type: !18, isLocal: true, isDefinition: true)
+!18 = !DICompositeType(tag: DW_TAG_structure_type, name: "walrus", scope: !19, file: !2, line: 24, size: 8, align: 8, elements: !20)
+!19 = !DINamespace(scope: null, file: !2, line: 23)
+!20 = !{!21}
+!21 = !DISubprogram(name: "walrus", scope: !18, file: !2, line: 25, type: !22, isLocal: false, isDefinition: false, scopeLine: 25, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false)
+!22 = !DISubroutineType(types: !23)
+!23 = !{null, !24}
+!24 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !18, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!25 = !DIGlobalVariableExpression(var: !26)
+!26 = !DIGlobalVariable(name: "wom", scope: null, file: !2, line: 38, type: !27, isLocal: false, isDefinition: true)
+!27 = !DICompositeType(tag: DW_TAG_structure_type, name: "wombat", file: !2, line: 31, size: 64, align: 32, elements: !28, identifier: "_ZTS6wombat")
+!28 = !{!29}
+!29 = !DIDerivedType(tag: DW_TAG_member, name: "a_b", scope: !27, file: !2, line: 35, baseType: !30, size: 64, align: 32)
+!30 = !DICompositeType(tag: DW_TAG_structure_type, scope: !27, file: !2, line: 32, size: 64, align: 32, elements: !31, identifier: "_ZTSN6wombatUt_E")
+!31 = !{!32, !33}
+!32 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !30, file: !2, line: 33, baseType: !14, size: 32, align: 32)
+!33 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !30, file: !2, line: 34, baseType: !14, size: 32, align: 32, offset: 32)
+!34 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.5 ", isOptimized: false, runtimeVersion: 0, splitDebugFilename: "bar.dwo", emissionKind: FullDebug, enums: !5, retainedTypes: !35, globals: !36, imports: !5)
+!35 = !{!3, !11, !27, !30}
+!36 = !{!0, !6, !16, !25}
+!37 = !{i32 2, !"Dwarf Version", i32 4}
+!38 = !{i32 1, !"Debug Info Version", i32 3}
+!39 = !{!"clang version 3.5 "}
+!40 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !2, file: !2, line: 5, type: !41, isLocal: false, isDefinition: true, scopeLine: 5, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !34, variables: !5)
+!41 = !DISubroutineType(types: !42)
+!42 = !{null}
+!43 = !DILocalVariable(name: "b", scope: !40, file: !2, line: 7, type: !44)
+!44 = !DICompositeType(tag: DW_TAG_structure_type, name: "baz", scope: !40, file: !2, line: 6, size: 8, align: 8, elements: !5)
+!45 = !DIExpression()
+!46 = !DILocation(line: 7, scope: !40)
+!47 = !DILocation(line: 8, scope: !40)
+!48 = distinct !DISubprogram(name: "__cxx_global_var_init", scope: !2, file: !2, line: 29, type: !41, isLocal: true, isDefinition: true, scopeLine: 29, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !34, variables: !5)
+!49 = !DILocation(line: 29, scope: !48)
+!50 = distinct !DISubprogram(name: "walrus", linkageName: "_ZN12_GLOBAL__N_16walrusC2Ev", scope: !18, file: !2, line: 25, type: !22, isLocal: true, isDefinition: true, scopeLine: 25, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !34, declaration: !21, variables: !5)
+!51 = !DILocalVariable(name: "this", arg: 1, scope: !50, type: !52, flags: DIFlagArtificial | DIFlagObjectPointer)
+!52 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !18, size: 64, align: 64)
+!53 = !DILocation(line: 0, scope: !50)
+!54 = !DILocation(line: 25, scope: !50)
+!55 = distinct !DISubprogram(linkageName: "_GLOBAL__I_a", scope: !2, file: !2, line: 25, type: !56, isLocal: true, isDefinition: true, scopeLine: 25, virtualIndex: 6, flags: DIFlagArtificial, isOptimized: false, unit: !34, variables: !5)
+!56 = !DISubroutineType(types: !5)
+!57 = !DILocation(line: 25, scope: !55)
+
diff --git a/llvm/test/DebugInfo/X86/gnu-public-names.ll b/llvm/test/DebugInfo/X86/gnu-public-names.ll
index 6f85c70..44cf0c5 100644
--- a/llvm/test/DebugInfo/X86/gnu-public-names.ll
+++ b/llvm/test/DebugInfo/X86/gnu-public-names.ll
@@ -219,146 +219,155 @@
; CHECK-NEXT: [[STATIC_MEM_VAR]] EXTERNAL VARIABLE "C::static_member_variable"
; CHECK-NEXT: [[STATIC_MEM_FUNC]] EXTERNAL FUNCTION "C::static_member_function"
-
-
; CHECK-LABEL: debug_gnu_pubtypes contents:
; CHECK: Offset Linkage Kind Name
; CHECK-DAG: [[C]] EXTERNAL TYPE "C"
; CHECK-DAG: [[D]] EXTERNAL TYPE "ns::D"
; CHECK-DAG: [[INT]] STATIC TYPE "int"
+source_filename = "test/DebugInfo/X86/gnu-public-names.ll"
+
%struct.C = type { i8 }
%"struct.ns::D" = type { i32 }
-@_ZN1C22static_member_variableE = global i32 0, align 4, !dbg !32
-@global_variable = global %struct.C zeroinitializer, align 1, !dbg !33
-@_ZN2ns25global_namespace_variableE = global i32 1, align 4, !dbg !34
-@_ZN2ns1dE = global %"struct.ns::D" zeroinitializer, align 4, !dbg !35
-@_ZZ2f3vE1z = internal global i32 0, align 4, !dbg !36
-@_ZN12_GLOBAL__N_11iE = internal global i32 0, align 4, !dbg !37
-@_ZN12_GLOBAL__N_15inner1bE = internal global i32 0, align 4, !dbg !39
-@_ZN5outer12_GLOBAL__N_11cE = internal global i32 0, align 4, !dbg !41
+@_ZN1C22static_member_variableE = global i32 0, align 4, !dbg !0
+@global_variable = global %struct.C zeroinitializer, align 1, !dbg !22
+@_ZN2ns25global_namespace_variableE = global i32 1, align 4, !dbg !24
+@_ZN2ns1dE = global %"struct.ns::D" zeroinitializer, align 4, !dbg !26
+@_ZZ2f3vE1z = internal global i32 0, align 4, !dbg !28
+@_ZN12_GLOBAL__N_11iE = internal global i32 0, align 4, !dbg !34
+@_ZN12_GLOBAL__N_15inner1bE = internal global i32 0, align 4, !dbg !37
+@_ZN5outer12_GLOBAL__N_11cE = internal global i32 0, align 4, !dbg !40
; Function Attrs: nounwind uwtable
-define void @_ZN1C15member_functionEv(%struct.C* %this) #0 align 2 !dbg !20 {
+define void @_ZN1C15member_functionEv(%struct.C* %this) #0 align 2 !dbg !51 {
entry:
%this.addr = alloca %struct.C*, align 8
store %struct.C* %this, %struct.C** %this.addr, align 8
- call void @llvm.dbg.declare(metadata %struct.C** %this.addr, metadata !51, metadata !53), !dbg !54
+ call void @llvm.dbg.declare(metadata %struct.C** %this.addr, metadata !52, metadata !54), !dbg !55
%this1 = load %struct.C*, %struct.C** %this.addr
- store i32 0, i32* @_ZN1C22static_member_variableE, align 4, !dbg !55
- ret void, !dbg !56
+ store i32 0, i32* @_ZN1C22static_member_variableE, align 4, !dbg !56
+ ret void, !dbg !57
}
; Function Attrs: nounwind readnone
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
; Function Attrs: nounwind uwtable
-define i32 @_ZN1C22static_member_functionEv() #0 align 2 !dbg !21 {
+define i32 @_ZN1C22static_member_functionEv() #0 align 2 !dbg !58 {
entry:
- %0 = load i32, i32* @_ZN1C22static_member_variableE, align 4, !dbg !57
- ret i32 %0, !dbg !57
+ %0 = load i32, i32* @_ZN1C22static_member_variableE, align 4, !dbg !59
+ ret i32 %0, !dbg !59
}
; Function Attrs: nounwind uwtable
-define i32 @_Z15global_functionv() #0 !dbg !22 {
+define i32 @_Z15global_functionv() #0 !dbg !60 {
entry:
- ret i32 -1, !dbg !58
+ ret i32 -1, !dbg !61
}
; Function Attrs: nounwind uwtable
-define void @_ZN2ns25global_namespace_functionEv() #0 !dbg !23 {
+define void @_ZN2ns25global_namespace_functionEv() #0 !dbg !62 {
entry:
- call void @_ZN1C15member_functionEv(%struct.C* @global_variable), !dbg !59
- ret void, !dbg !60
+ call void @_ZN1C15member_functionEv(%struct.C* @global_variable), !dbg !65
+ ret void, !dbg !66
}
; Function Attrs: nounwind uwtable
-define i32* @_Z2f3v() #0 !dbg !26 {
+define i32* @_Z2f3v() #0 !dbg !30 {
entry:
- ret i32* @_ZZ2f3vE1z, !dbg !61
+ ret i32* @_ZZ2f3vE1z, !dbg !67
}
; Function Attrs: nounwind uwtable
-define i32 @_Z2f7v() #0 !dbg !30 {
+define i32 @_Z2f7v() #0 !dbg !68 {
entry:
- %0 = load i32, i32* @_ZN12_GLOBAL__N_11iE, align 4, !dbg !62
- %call = call i32* @_Z2f3v(), !dbg !62
- %1 = load i32, i32* %call, align 4, !dbg !62
- %add = add nsw i32 %0, %1, !dbg !62
- %2 = load i32, i32* @_ZN12_GLOBAL__N_15inner1bE, align 4, !dbg !62
- %add1 = add nsw i32 %add, %2, !dbg !62
- %3 = load i32, i32* @_ZN5outer12_GLOBAL__N_11cE, align 4, !dbg !62
- %add2 = add nsw i32 %add1, %3, !dbg !62
- ret i32 %add2, !dbg !62
+ %0 = load i32, i32* @_ZN12_GLOBAL__N_11iE, align 4, !dbg !69
+ %call = call i32* @_Z2f3v(), !dbg !69
+ %1 = load i32, i32* %call, align 4, !dbg !69
+ %add = add nsw i32 %0, %1, !dbg !69
+ %2 = load i32, i32* @_ZN12_GLOBAL__N_15inner1bE, align 4, !dbg !69
+ %add1 = add nsw i32 %add, %2, !dbg !69
+ %3 = load i32, i32* @_ZN5outer12_GLOBAL__N_11cE, align 4, !dbg !69
+ %add2 = add nsw i32 %add1, %3, !dbg !69
+ ret i32 %add2, !dbg !69
}
attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { nounwind readnone }
-!llvm.dbg.cu = !{!0}
+!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!48, !49}
!llvm.ident = !{!50}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.7.0 (trunk 234897) (llvm/trunk 234911)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, globals: !31, imports: !44)
-!1 = !DIFile(filename: "gnu-public-names.cpp", directory: "/tmp/dbginfo")
-!2 = !{}
-!3 = !{!4, !15}
-!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", file: !1, line: 1, size: 8, align: 8, elements: !5, identifier: "_ZTS1C")
-!5 = !{!6, !8, !12}
-!6 = !DIDerivedType(tag: DW_TAG_member, name: "static_member_variable", scope: !4, file: !1, line: 4, baseType: !7, flags: DIFlagStaticMember)
-!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!8 = !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !4, file: !1, line: 2, type: !9, isLocal: false, isDefinition: false, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false)
-!9 = !DISubroutineType(types: !10)
-!10 = !{null, !11}
-!11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
-!12 = !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !4, file: !1, line: 3, type: !13, isLocal: false, isDefinition: false, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false)
-!13 = !DISubroutineType(types: !14)
-!14 = !{!7}
-!15 = !DICompositeType(tag: DW_TAG_structure_type, name: "D", scope: !16, file: !1, line: 29, size: 32, align: 32, elements: !17, identifier: "_ZTSN2ns1DE")
-!16 = !DINamespace(name: "ns", scope: null, file: !1, line: 23)
-!17 = !{!18}
-!18 = !DIDerivedType(tag: DW_TAG_member, name: "A", scope: !15, file: !1, line: 30, baseType: !7, size: 32, align: 32)
-!20 = distinct !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !4, file: !1, line: 9, type: !9, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !8, variables: !2)
-!21 = distinct !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !4, file: !1, line: 13, type: !13, isLocal: false, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: false, unit: !0, declaration: !12, variables: !2)
-!22 = distinct !DISubprogram(name: "global_function", linkageName: "_Z15global_functionv", scope: !1, file: !1, line: 19, type: !13, isLocal: false, isDefinition: true, scopeLine: 19, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
-!23 = distinct !DISubprogram(name: "global_namespace_function", linkageName: "_ZN2ns25global_namespace_functionEv", scope: !16, file: !1, line: 24, type: !24, isLocal: false, isDefinition: true, scopeLine: 24, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
-!24 = !DISubroutineType(types: !25)
-!25 = !{null}
-!26 = distinct !DISubprogram(name: "f3", linkageName: "_Z2f3v", scope: !1, file: !1, line: 40, type: !27, isLocal: false, isDefinition: true, scopeLine: 40, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
-!27 = !DISubroutineType(types: !28)
-!28 = !{!29}
-!29 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64, align: 64)
-!30 = distinct !DISubprogram(name: "f7", linkageName: "_Z2f7v", scope: !1, file: !1, line: 57, type: !13, isLocal: false, isDefinition: true, scopeLine: 57, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
-!31 = !{!32, !33, !34, !35, !36, !37, !39, !41}
-!32 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "static_member_variable", linkageName: "_ZN1C22static_member_variableE", scope: !0, file: !1, line: 7, type: !7, isLocal: false, isDefinition: true, declaration: !6))
-!33 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "global_variable", scope: !0, file: !1, line: 17, type: !4, isLocal: false, isDefinition: true))
-!34 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "global_namespace_variable", linkageName: "_ZN2ns25global_namespace_variableE", scope: !16, file: !1, line: 27, type: !7, isLocal: false, isDefinition: true))
-!35 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "d", linkageName: "_ZN2ns1dE", scope: !16, file: !1, line: 31, type: !15, isLocal: false, isDefinition: true))
-!36 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "z", scope: !26, file: !1, line: 41, type: !7, isLocal: true, isDefinition: true))
-!37 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "i", linkageName: "_ZN12_GLOBAL__N_11iE", scope: !38, file: !1, line: 37, type: !7, isLocal: true, isDefinition: true))
-!38 = !DINamespace(scope: null, file: !1, line: 36)
-!39 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "b", linkageName: "_ZN12_GLOBAL__N_15inner1bE", scope: !40, file: !1, line: 47, type: !7, isLocal: true, isDefinition: true))
-!40 = !DINamespace(name: "inner", scope: !38, file: !1, line: 46)
-!41 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "c", linkageName: "_ZN5outer12_GLOBAL__N_11cE", scope: !42, file: !1, line: 53, type: !7, isLocal: true, isDefinition: true))
-!42 = !DINamespace(scope: !43, file: !1, line: 52)
-!43 = !DINamespace(name: "outer", scope: null, file: !1, line: 51)
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "static_member_variable", linkageName: "_ZN1C22static_member_variableE", scope: !2, file: !3, line: 7, type: !9, isLocal: false, isDefinition: true, declaration: !8)
+!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 3.7.0 (trunk 234897) (llvm/trunk 234911)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !5, globals: !21, imports: !44)
+!3 = !DIFile(filename: "gnu-public-names.cpp", directory: "/tmp/dbginfo")
+!4 = !{}
+!5 = !{!6, !17}
+!6 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", file: !3, line: 1, size: 8, align: 8, elements: !7, identifier: "_ZTS1C")
+!7 = !{!8, !10, !14}
+!8 = !DIDerivedType(tag: DW_TAG_member, name: "static_member_variable", scope: !6, file: !3, line: 4, baseType: !9, flags: DIFlagStaticMember)
+!9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!10 = !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !6, file: !3, line: 2, type: !11, isLocal: false, isDefinition: false, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false)
+!11 = !DISubroutineType(types: !12)
+!12 = !{null, !13}
+!13 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!14 = !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !6, file: !3, line: 3, type: !15, isLocal: false, isDefinition: false, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false)
+!15 = !DISubroutineType(types: !16)
+!16 = !{!9}
+!17 = !DICompositeType(tag: DW_TAG_structure_type, name: "D", scope: !18, file: !3, line: 29, size: 32, align: 32, elements: !19, identifier: "_ZTSN2ns1DE")
+!18 = !DINamespace(name: "ns", scope: null, file: !3, line: 23)
+!19 = !{!20}
+!20 = !DIDerivedType(tag: DW_TAG_member, name: "A", scope: !17, file: !3, line: 30, baseType: !9, size: 32, align: 32)
+!21 = !{!0, !22, !24, !26, !28, !34, !37, !40}
+!22 = !DIGlobalVariableExpression(var: !23)
+!23 = !DIGlobalVariable(name: "global_variable", scope: !2, file: !3, line: 17, type: !6, isLocal: false, isDefinition: true)
+!24 = !DIGlobalVariableExpression(var: !25)
+!25 = !DIGlobalVariable(name: "global_namespace_variable", linkageName: "_ZN2ns25global_namespace_variableE", scope: !18, file: !3, line: 27, type: !9, isLocal: false, isDefinition: true)
+!26 = !DIGlobalVariableExpression(var: !27)
+!27 = !DIGlobalVariable(name: "d", linkageName: "_ZN2ns1dE", scope: !18, file: !3, line: 31, type: !17, isLocal: false, isDefinition: true)
+!28 = !DIGlobalVariableExpression(var: !29)
+!29 = !DIGlobalVariable(name: "z", scope: !30, file: !3, line: 41, type: !9, isLocal: true, isDefinition: true)
+!30 = distinct !DISubprogram(name: "f3", linkageName: "_Z2f3v", scope: !3, file: !3, line: 40, type: !31, isLocal: false, isDefinition: true, scopeLine: 40, flags: DIFlagPrototyped, isOptimized: false, unit: !2, variables: !4)
+!31 = !DISubroutineType(types: !32)
+!32 = !{!33}
+!33 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !9, size: 64, align: 64)
+!34 = !DIGlobalVariableExpression(var: !35)
+!35 = !DIGlobalVariable(name: "i", linkageName: "_ZN12_GLOBAL__N_11iE", scope: !36, file: !3, line: 37, type: !9, isLocal: true, isDefinition: true)
+!36 = !DINamespace(scope: null, file: !3, line: 36)
+!37 = !DIGlobalVariableExpression(var: !38)
+!38 = !DIGlobalVariable(name: "b", linkageName: "_ZN12_GLOBAL__N_15inner1bE", scope: !39, file: !3, line: 47, type: !9, isLocal: true, isDefinition: true)
+!39 = !DINamespace(name: "inner", scope: !36, file: !3, line: 46)
+!40 = !DIGlobalVariableExpression(var: !41)
+!41 = !DIGlobalVariable(name: "c", linkageName: "_ZN5outer12_GLOBAL__N_11cE", scope: !42, file: !3, line: 53, type: !9, isLocal: true, isDefinition: true)
+!42 = !DINamespace(scope: !43, file: !3, line: 52)
+!43 = !DINamespace(name: "outer", scope: null, file: !3, line: 51)
!44 = !{!45, !47}
-!45 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !0, entity: !46, line: 34)
-!46 = !DIGlobalVariable(name: "global_namespace_variable_decl", linkageName: "_ZN2ns30global_namespace_variable_declE", scope: !16, file: !1, line: 28, type: !7, isLocal: false, isDefinition: false)
+!45 = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !2, entity: !46, line: 34)
+!46 = !DIGlobalVariable(name: "global_namespace_variable_decl", linkageName: "_ZN2ns30global_namespace_variable_declE", scope: !18, file: !3, line: 28, type: !9, isLocal: false, isDefinition: false)
!47 = !DIImportedEntity(tag: DW_TAG_imported_module, scope: !43, entity: !42, line: 43)
!48 = !{i32 2, !"Dwarf Version", i32 4}
!49 = !{i32 2, !"Debug Info Version", i32 3}
!50 = !{!"clang version 3.7.0 (trunk 234897) (llvm/trunk 234911)"}
-!51 = !DILocalVariable(name: "this", arg: 1, scope: !20, type: !52, flags: DIFlagArtificial | DIFlagObjectPointer)
-!52 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64)
-!53 = !DIExpression()
-!54 = !DILocation(line: 0, scope: !20)
-!55 = !DILocation(line: 10, scope: !20)
-!56 = !DILocation(line: 11, scope: !20)
-!57 = !DILocation(line: 14, scope: !21)
-!58 = !DILocation(line: 20, scope: !22)
-!59 = !DILocation(line: 25, scope: !23)
-!60 = !DILocation(line: 26, scope: !23)
-!61 = !DILocation(line: 42, scope: !26)
-!62 = !DILocation(line: 58, scope: !30)
+!51 = distinct !DISubprogram(name: "member_function", linkageName: "_ZN1C15member_functionEv", scope: !6, file: !3, line: 9, type: !11, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: false, unit: !2, declaration: !10, variables: !4)
+!52 = !DILocalVariable(name: "this", arg: 1, scope: !51, type: !53, flags: DIFlagArtificial | DIFlagObjectPointer)
+!53 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 64, align: 64)
+!54 = !DIExpression()
+!55 = !DILocation(line: 0, scope: !51)
+!56 = !DILocation(line: 10, scope: !51)
+!57 = !DILocation(line: 11, scope: !51)
+!58 = distinct !DISubprogram(name: "static_member_function", linkageName: "_ZN1C22static_member_functionEv", scope: !6, file: !3, line: 13, type: !15, isLocal: false, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: false, unit: !2, declaration: !14, variables: !4)
+!59 = !DILocation(line: 14, scope: !58)
+!60 = distinct !DISubprogram(name: "global_function", linkageName: "_Z15global_functionv", scope: !3, file: !3, line: 19, type: !15, isLocal: false, isDefinition: true, scopeLine: 19, flags: DIFlagPrototyped, isOptimized: false, unit: !2, variables: !4)
+!61 = !DILocation(line: 20, scope: !60)
+!62 = distinct !DISubprogram(name: "global_namespace_function", linkageName: "_ZN2ns25global_namespace_functionEv", scope: !18, file: !3, line: 24, type: !63, isLocal: false, isDefinition: true, scopeLine: 24, flags: DIFlagPrototyped, isOptimized: false, unit: !2, variables: !4)
+!63 = !DISubroutineType(types: !64)
+!64 = !{null}
+!65 = !DILocation(line: 25, scope: !62)
+!66 = !DILocation(line: 26, scope: !62)
+!67 = !DILocation(line: 42, scope: !30)
+!68 = distinct !DISubprogram(name: "f7", linkageName: "_Z2f7v", scope: !3, file: !3, line: 57, type: !15, isLocal: false, isDefinition: true, scopeLine: 57, flags: DIFlagPrototyped, isOptimized: false, unit: !2, variables: !4)
+!69 = !DILocation(line: 58, scope: !68)
+
diff --git a/llvm/test/DebugInfo/X86/inline-member-function.ll b/llvm/test/DebugInfo/X86/inline-member-function.ll
index f4c1903..f1b8570 100644
--- a/llvm/test/DebugInfo/X86/inline-member-function.ll
+++ b/llvm/test/DebugInfo/X86/inline-member-function.ll
@@ -32,63 +32,68 @@
; CHECK-NOT: DW_AT_artificial
; CHECK: DW_TAG
+source_filename = "test/DebugInfo/X86/inline-member-function.ll"
+
%struct.foo = type { i8 }
-@i = global i32 0, align 4, !dbg !19
+@i = global i32 0, align 4, !dbg !0
; Function Attrs: uwtable
-define i32 @main() #0 !dbg !13 {
+define i32 @main() #0 !dbg !17 {
entry:
%this.addr.i = alloca %struct.foo*, align 8
%x.addr.i = alloca i32, align 4
%retval = alloca i32, align 4
%tmp = alloca %struct.foo, align 1
store i32 0, i32* %retval
- %0 = load i32, i32* @i, align 4, !dbg !23
+ %0 = load i32, i32* @i, align 4, !dbg !20
store %struct.foo* %tmp, %struct.foo** %this.addr.i, align 8
- call void @llvm.dbg.declare(metadata %struct.foo** %this.addr.i, metadata !24, metadata !DIExpression()), !dbg !26
+ call void @llvm.dbg.declare(metadata %struct.foo** %this.addr.i, metadata !21, metadata !24), !dbg !25
store i32 %0, i32* %x.addr.i, align 4
- call void @llvm.dbg.declare(metadata i32* %x.addr.i, metadata !27, metadata !DIExpression()), !dbg !28
+ call void @llvm.dbg.declare(metadata i32* %x.addr.i, metadata !26, metadata !24), !dbg !27
%this1.i = load %struct.foo*, %struct.foo** %this.addr.i
- %1 = load i32, i32* %x.addr.i, align 4, !dbg !28
- %add.i = add nsw i32 %1, 2, !dbg !28
- ret i32 %add.i, !dbg !23
+ %1 = load i32, i32* %x.addr.i, align 4, !dbg !27
+ %add.i = add nsw i32 %1, 2, !dbg !27
+ ret i32 %add.i, !dbg !20
}
; Function Attrs: nounwind readnone
+
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
attributes #0 = { uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { nounwind readnone }
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!20, !21}
-!llvm.ident = !{!22}
+!llvm.dbg.cu = !{!4}
+!llvm.module.flags = !{!14, !15}
+!llvm.ident = !{!16}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !18, imports: !2)
-!1 = !DIFile(filename: "inline.cpp", directory: "/tmp/dbginfo")
-!2 = !{}
-!3 = !{!4}
-!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", line: 1, size: 8, align: 8, file: !1, elements: !5, identifier: "_ZTS3foo")
-!5 = !{!6}
-!6 = !DISubprogram(name: "func", linkageName: "_ZN3foo4funcEi", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !4, type: !7)
-!7 = !DISubroutineType(types: !8)
-!8 = !{!9, !10, !9}
-!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!10 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
-!13 = distinct !DISubprogram(name: "main", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 7, file: !1, scope: !14, type: !15, variables: !2)
-!14 = !DIFile(filename: "inline.cpp", directory: "/tmp/dbginfo")
-!15 = !DISubroutineType(types: !16)
-!16 = !{!9}
-!17 = distinct !DISubprogram(name: "func", linkageName: "_ZN3foo4funcEi", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 2, file: !1, scope: !4, type: !7, declaration: !6, variables: !2)
-!18 = !{!19}
-!19 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "i", line: 5, isLocal: false, isDefinition: true, scope: null, file: !14, type: !9))
-!20 = !{i32 2, !"Dwarf Version", i32 4}
-!21 = !{i32 1, !"Debug Info Version", i32 3}
-!22 = !{!"clang version 3.5.0 "}
-!23 = !DILocation(line: 8, scope: !13)
-!24 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !17, type: !25)
-!25 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !4)
-!26 = !DILocation(line: 0, scope: !17, inlinedAt: !23)
-!27 = !DILocalVariable(name: "x", line: 2, arg: 2, scope: !17, file: !14, type: !9)
-!28 = !DILocation(line: 2, scope: !17, inlinedAt: !23)
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "i", scope: null, file: !2, line: 5, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "inline.cpp", directory: "/tmp/dbginfo")
+!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!4 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.5.0 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !6, globals: !13, imports: !5)
+!5 = !{}
+!6 = !{!7}
+!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", file: !2, line: 1, size: 8, align: 8, elements: !8, identifier: "_ZTS3foo")
+!8 = !{!9}
+!9 = !DISubprogram(name: "func", linkageName: "_ZN3foo4funcEi", scope: !7, file: !2, line: 2, type: !10, isLocal: false, isDefinition: false, scopeLine: 2, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false)
+!10 = !DISubroutineType(types: !11)
+!11 = !{!3, !12, !3}
+!12 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!13 = !{!0}
+!14 = !{i32 2, !"Dwarf Version", i32 4}
+!15 = !{i32 1, !"Debug Info Version", i32 3}
+!16 = !{!"clang version 3.5.0 "}
+!17 = distinct !DISubprogram(name: "main", scope: !2, file: !2, line: 7, type: !18, isLocal: false, isDefinition: true, scopeLine: 7, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !4, variables: !5)
+!18 = !DISubroutineType(types: !19)
+!19 = !{!3}
+!20 = !DILocation(line: 8, scope: !17)
+!21 = !DILocalVariable(name: "this", arg: 1, scope: !22, type: !23, flags: DIFlagArtificial | DIFlagObjectPointer)
+!22 = distinct !DISubprogram(name: "func", linkageName: "_ZN3foo4funcEi", scope: !7, file: !2, line: 2, type: !10, isLocal: false, isDefinition: true, scopeLine: 2, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !4, declaration: !9, variables: !5)
+!23 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64, align: 64)
+!24 = !DIExpression()
+!25 = !DILocation(line: 0, scope: !22, inlinedAt: !20)
+!26 = !DILocalVariable(name: "x", arg: 2, scope: !22, file: !2, line: 2, type: !3)
+!27 = !DILocation(line: 2, scope: !22, inlinedAt: !20)
+
diff --git a/llvm/test/DebugInfo/X86/inline-namespace.ll b/llvm/test/DebugInfo/X86/inline-namespace.ll
index 1e9a0e6..3036e03 100644
--- a/llvm/test/DebugInfo/X86/inline-namespace.ll
+++ b/llvm/test/DebugInfo/X86/inline-namespace.ll
@@ -22,19 +22,21 @@
@_ZN6normal7inlined1iE = global i32 0, align 4, !dbg !0
-!llvm.dbg.cu = !{!5}
-!llvm.module.flags = !{!8, !9, !10}
-!llvm.ident = !{!11}
+!llvm.dbg.cu = !{!6}
+!llvm.module.flags = !{!9, !10, !11}
+!llvm.ident = !{!12}
-!0 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "i", linkageName: "_ZN6normal7inlined1iE", scope: !1, file: !2, line: 1, type: !4, isLocal: false, isDefinition: true))
-!1 = !DINamespace(name: "inlined", scope: !3, file: !2, line: 1, exportSymbols: true)
-!2 = !DIFile(filename: "namespace.cpp", directory: "/")
-!3 = !DINamespace(name: "normal", scope: null, file: !2, line: 1)
-!4 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-!5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 4.0.0 (trunk 285825) (llvm/trunk 285822)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !6, globals: !7)
-!6 = !{}
-!7 = !{!0}
-!8 = !{i32 2, !"Dwarf Version", i32 5}
-!9 = !{i32 2, !"Debug Info Version", i32 3}
-!10 = !{i32 1, !"PIC Level", i32 2}
-!11 = !{!"clang version 4.0.0 (trunk 285825) (llvm/trunk 285822)"}
+!0 = distinct !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "i", linkageName: "_ZN6normal7inlined1iE", scope: !2, file: !3, line: 1, type: !5, isLocal: false, isDefinition: true)
+!2 = !DINamespace(name: "inlined", scope: !4, file: !3, line: 1, exportSymbols: true)
+!3 = !DIFile(filename: "namespace.cpp", directory: "/")
+!4 = !DINamespace(name: "normal", scope: null, file: !3, line: 1)
+!5 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+!6 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 4.0.0 (trunk 285825) (llvm/trunk 285822)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !7, globals: !8)
+!7 = !{}
+!8 = !{!0}
+!9 = !{i32 2, !"Dwarf Version", i32 5}
+!10 = !{i32 2, !"Debug Info Version", i32 3}
+!11 = !{i32 1, !"PIC Level", i32 2}
+!12 = !{!"clang version 4.0.0 (trunk 285825) (llvm/trunk 285822)"}
+
diff --git a/llvm/test/DebugInfo/X86/inlined-indirect-value.ll b/llvm/test/DebugInfo/X86/inlined-indirect-value.ll
index 479a637..6a7d48b 100644
--- a/llvm/test/DebugInfo/X86/inlined-indirect-value.ll
+++ b/llvm/test/DebugInfo/X86/inlined-indirect-value.ll
@@ -16,19 +16,20 @@
; 09 x = x ? 1 : 2;
; 10 }
+source_filename = "test/DebugInfo/X86/inlined-indirect-value.ll"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
-@x = common global i32 0, align 4, !dbg !10
-@y = common global i32 0, align 4, !dbg !12
+@x = common global i32 0, align 4, !dbg !0
+@y = common global i32 0, align 4, !dbg !6
-define i32 @main() !dbg !4 {
+define i32 @main() !dbg !12 {
; CHECK: .loc 1 {{[89]}}
; CHECK-NOT: .loc
; CHECK: movl $1
entry:
- %0 = load volatile i32, i32* @x, align 4, !dbg !16, !tbaa !19
+ %0 = load volatile i32, i32* @x, align 4, !dbg !15, !tbaa !19
%mul.i = mul nsw i32 %0, 3, !dbg !23
%cmp.i = icmp slt i32 %mul.i, 14, !dbg !24
%..i = select i1 %cmp.i, i32 1, i32 2, !dbg !25
@@ -40,41 +41,44 @@
select.mid: ; preds = %entry
br label %select.end
-select.end: ; preds = %entry, %select.mid
+select.end: ; preds = %select.mid, %entry
%cond = phi i32 [ 1, %entry ], [ 2, %select.mid ]
store volatile i32 %cond, i32* @x, align 4, !dbg !29, !tbaa !19
ret i32 0, !dbg !30
}
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!13, !14}
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!10, !11}
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !9, imports: !2)
-!1 = !DIFile(filename: "inline-break.c", directory: "/build/dir")
-!2 = !{}
-!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 7, type: !5, isLocal: false, isDefinition: true, scopeLine: 7, isOptimized: true, unit: !0, variables: !2)
-!5 = !DISubroutineType(types: !6)
-!6 = !{!7}
-!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!8 = distinct !DISubprogram(name: "f1", scope: !1, file: !1, line: 3, type: !5, isLocal: true, isDefinition: true, scopeLine: 3, isOptimized: true, unit: !0, variables: !2)
-!9 = !{!10, !12}
-!10 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "x", scope: !0, file: !1, line: 1, type: !11, isLocal: false, isDefinition: true))
-!11 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !7)
-!12 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "y", scope: !0, file: !1, line: 2, type: !7, isLocal: false, isDefinition: true))
-!13 = !{i32 2, !"Dwarf Version", i32 4}
-!14 = !{i32 2, !"Debug Info Version", i32 3}
-!16 = !DILocation(line: 4, column: 9, scope: !17, inlinedAt: !18)
-!17 = distinct !DILexicalBlock(scope: !8, file: !1, line: 4, column: 9)
-!18 = distinct !DILocation(line: 8, column: 9, scope: !4)
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "x", scope: !2, file: !3, line: 1, type: !9, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !4, globals: !5, imports: !4)
+!3 = !DIFile(filename: "inline-break.c", directory: "/build/dir")
+!4 = !{}
+!5 = !{!0, !6}
+!6 = !DIGlobalVariableExpression(var: !7)
+!7 = !DIGlobalVariable(name: "y", scope: !2, file: !3, line: 2, type: !8, isLocal: false, isDefinition: true)
+!8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!9 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !8)
+!10 = !{i32 2, !"Dwarf Version", i32 4}
+!11 = !{i32 2, !"Debug Info Version", i32 3}
+!12 = distinct !DISubprogram(name: "main", scope: !3, file: !3, line: 7, type: !13, isLocal: false, isDefinition: true, scopeLine: 7, isOptimized: true, unit: !2, variables: !4)
+!13 = !DISubroutineType(types: !14)
+!14 = !{!8}
+!15 = !DILocation(line: 4, column: 9, scope: !16, inlinedAt: !18)
+!16 = distinct !DILexicalBlock(scope: !17, file: !3, line: 4, column: 9)
+!17 = distinct !DISubprogram(name: "f1", scope: !3, file: !3, line: 3, type: !13, isLocal: true, isDefinition: true, scopeLine: 3, isOptimized: true, unit: !2, variables: !4)
+!18 = distinct !DILocation(line: 8, column: 9, scope: !12)
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !21, i64 0}
!21 = !{!"omnipotent char", !22, i64 0}
!22 = !{!"Simple C/C++ TBAA"}
-!23 = !DILocation(line: 4, column: 11, scope: !17, inlinedAt: !18)
-!24 = !DILocation(line: 4, column: 15, scope: !17, inlinedAt: !18)
+!23 = !DILocation(line: 4, column: 11, scope: !16, inlinedAt: !18)
+!24 = !DILocation(line: 4, column: 15, scope: !16, inlinedAt: !18)
!25 = !DILocation(line: 4, column: 21, scope: !26, inlinedAt: !18)
-!26 = !DILexicalBlockFile(scope: !17, file: !1, discriminator: 1)
-!27 = !DILocation(line: 8, column: 7, scope: !4)
-!28 = !DILocation(line: 9, column: 9, scope: !4)
-!29 = !DILocation(line: 9, column: 7, scope: !4)
-!30 = !DILocation(line: 10, column: 1, scope: !4)
+!26 = !DILexicalBlockFile(scope: !16, file: !3, discriminator: 1)
+!27 = !DILocation(line: 8, column: 7, scope: !12)
+!28 = !DILocation(line: 9, column: 9, scope: !12)
+!29 = !DILocation(line: 9, column: 7, scope: !12)
+!30 = !DILocation(line: 10, column: 1, scope: !12)
+
diff --git a/llvm/test/DebugInfo/X86/isel-cse-line.ll b/llvm/test/DebugInfo/X86/isel-cse-line.ll
index 94502fc..4e0d4b9 100644
--- a/llvm/test/DebugInfo/X86/isel-cse-line.ll
+++ b/llvm/test/DebugInfo/X86/isel-cse-line.ll
@@ -28,73 +28,78 @@
; CHECK-NOT: .loc 1 12
; ModuleID = 't.cpp'
+source_filename = "test/DebugInfo/X86/isel-cse-line.ll"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
-@glb_start = global i64 17, align 8, !dbg !7
-@glb_end = global i64 42, align 8, !dbg !10
+@glb_start = global i64 17, align 8, !dbg !0
+@glb_end = global i64 42, align 8, !dbg !9
-; Function Attrs: norecurse nounwind uwtable
-define i32 @main() !dbg !14 {
+define i32 @main() !dbg !16 {
%1 = alloca i32, align 4
%2 = alloca i64, align 8
%3 = alloca i64, align 8
%4 = alloca double, align 8
%5 = alloca double, align 8
store i32 0, i32* %1, align 4
- call void @llvm.dbg.declare(metadata i64* %2, metadata !18, metadata !19), !dbg !20
- %6 = load i64, i64* @glb_start, align 8, !dbg !21
- store i64 %6, i64* %2, align 8, !dbg !20
- call void @llvm.dbg.declare(metadata i64* %3, metadata !22, metadata !19), !dbg !23
- %7 = load i64, i64* @glb_end, align 8, !dbg !24
- store i64 %7, i64* %3, align 8, !dbg !23
- call void @llvm.dbg.declare(metadata double* %4, metadata !25, metadata !19), !dbg !26
- %8 = load i64, i64* %2, align 8, !dbg !27
- %9 = uitofp i64 %8 to double, !dbg !27
- store double %9, double* %4, align 8, !dbg !26
- call void @llvm.dbg.declare(metadata double* %5, metadata !28, metadata !19), !dbg !29
- %10 = load i64, i64* %3, align 8, !dbg !30
- %11 = uitofp i64 %10 to double, !dbg !30
- store double %11, double* %5, align 8, !dbg !29
- ret i32 0, !dbg !31
+ call void @llvm.dbg.declare(metadata i64* %2, metadata !20, metadata !21), !dbg !22
+ %6 = load i64, i64* @glb_start, align 8, !dbg !23
+ store i64 %6, i64* %2, align 8, !dbg !22
+ call void @llvm.dbg.declare(metadata i64* %3, metadata !24, metadata !21), !dbg !25
+ %7 = load i64, i64* @glb_end, align 8, !dbg !26
+ store i64 %7, i64* %3, align 8, !dbg !25
+ call void @llvm.dbg.declare(metadata double* %4, metadata !27, metadata !21), !dbg !28
+ %8 = load i64, i64* %2, align 8, !dbg !29
+ %9 = uitofp i64 %8 to double, !dbg !29
+ store double %9, double* %4, align 8, !dbg !28
+ call void @llvm.dbg.declare(metadata double* %5, metadata !30, metadata !21), !dbg !31
+ %10 = load i64, i64* %3, align 8, !dbg !32
+ %11 = uitofp i64 %10 to double, !dbg !32
+ store double %11, double* %5, align 8, !dbg !31
+ ret i32 0, !dbg !33
}
; Function Attrs: nounwind readnone
-declare void @llvm.dbg.declare(metadata, metadata, metadata)
+declare void @llvm.dbg.declare(metadata, metadata, metadata) #0
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!11, !12}
-!llvm.ident = !{!13}
+attributes #0 = { nounwind readnone }
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 (trunk 268246)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, globals: !6)
-!1 = !DIFile(filename: "/home/wpieb/test/D12094.cpp", directory: "/home/wpieb/build/llvm/trunk/llvm-RelWithDebInfo")
-!2 = !{}
-!3 = !{!4}
-!4 = !DIDerivedType(tag: DW_TAG_typedef, name: "fp_t", file: !1, line: 1, baseType: !5)
-!5 = !DIBasicType(name: "double", size: 64, align: 64, encoding: DW_ATE_float)
-!6 = !{!7, !10}
-!7 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "glb_start", scope: !0, file: !1, line: 4, type: !8, isLocal: false, isDefinition: true))
-!8 = !DIDerivedType(tag: DW_TAG_typedef, name: "int_t", file: !1, line: 2, baseType: !9)
-!9 = !DIBasicType(name: "long unsigned int", size: 64, align: 64, encoding: DW_ATE_unsigned)
-!10 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "glb_end", scope: !0, file: !1, line: 5, type: !8, isLocal: false, isDefinition: true))
-!11 = !{i32 2, !"Dwarf Version", i32 4}
-!12 = !{i32 2, !"Debug Info Version", i32 3}
-!13 = !{!"clang version 3.9.0 (trunk 268246)"}
-!14 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 7, type: !15, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
-!15 = !DISubroutineType(types: !16)
-!16 = !{!17}
-!17 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!18 = !DILocalVariable(name: "start", scope: !14, file: !1, line: 9, type: !8)
-!19 = !DIExpression()
-!20 = !DILocation(line: 9, column: 9, scope: !14)
-!21 = !DILocation(line: 9, column: 17, scope: !14)
-!22 = !DILocalVariable(name: "end", scope: !14, file: !1, line: 10, type: !8)
-!23 = !DILocation(line: 10, column: 9, scope: !14)
-!24 = !DILocation(line: 10, column: 17, scope: !14)
-!25 = !DILocalVariable(name: "dbl_start", scope: !14, file: !1, line: 12, type: !4)
-!26 = !DILocation(line: 12, column: 8, scope: !14)
-!27 = !DILocation(line: 12, column: 27, scope: !14)
-!28 = !DILocalVariable(name: "dbl_end", scope: !14, file: !1, line: 13, type: !4)
-!29 = !DILocation(line: 13, column: 8, scope: !14)
-!30 = !DILocation(line: 13, column: 27, scope: !14)
-!31 = !DILocation(line: 15, column: 3, scope: !14)
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!13, !14}
+!llvm.ident = !{!15}
+
+!0 = distinct !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "glb_start", scope: !2, file: !3, line: 4, type: !11, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 3.9.0 (trunk 268246)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !5, globals: !8)
+!3 = !DIFile(filename: "/home/wpieb/test/D12094.cpp", directory: "/home/wpieb/build/llvm/trunk/llvm-RelWithDebInfo")
+!4 = !{}
+!5 = !{!6}
+!6 = !DIDerivedType(tag: DW_TAG_typedef, name: "fp_t", file: !3, line: 1, baseType: !7)
+!7 = !DIBasicType(name: "double", size: 64, align: 64, encoding: DW_ATE_float)
+!8 = !{!0, !9}
+!9 = distinct !DIGlobalVariableExpression(var: !10)
+!10 = !DIGlobalVariable(name: "glb_end", scope: !2, file: !3, line: 5, type: !11, isLocal: false, isDefinition: true)
+!11 = !DIDerivedType(tag: DW_TAG_typedef, name: "int_t", file: !3, line: 2, baseType: !12)
+!12 = !DIBasicType(name: "long unsigned int", size: 64, align: 64, encoding: DW_ATE_unsigned)
+!13 = !{i32 2, !"Dwarf Version", i32 4}
+!14 = !{i32 2, !"Debug Info Version", i32 3}
+!15 = !{!"clang version 3.9.0 (trunk 268246)"}
+!16 = distinct !DISubprogram(name: "main", scope: !3, file: !3, line: 7, type: !17, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: false, unit: !2, variables: !4)
+!17 = !DISubroutineType(types: !18)
+!18 = !{!19}
+!19 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!20 = !DILocalVariable(name: "start", scope: !16, file: !3, line: 9, type: !11)
+!21 = !DIExpression()
+!22 = !DILocation(line: 9, column: 9, scope: !16)
+!23 = !DILocation(line: 9, column: 17, scope: !16)
+!24 = !DILocalVariable(name: "end", scope: !16, file: !3, line: 10, type: !11)
+!25 = !DILocation(line: 10, column: 9, scope: !16)
+!26 = !DILocation(line: 10, column: 17, scope: !16)
+!27 = !DILocalVariable(name: "dbl_start", scope: !16, file: !3, line: 12, type: !6)
+!28 = !DILocation(line: 12, column: 8, scope: !16)
+!29 = !DILocation(line: 12, column: 27, scope: !16)
+!30 = !DILocalVariable(name: "dbl_end", scope: !16, file: !3, line: 13, type: !6)
+!31 = !DILocation(line: 13, column: 8, scope: !16)
+!32 = !DILocation(line: 13, column: 27, scope: !16)
+!33 = !DILocation(line: 15, column: 3, scope: !16)
+
diff --git a/llvm/test/DebugInfo/X86/linkage-name.ll b/llvm/test/DebugInfo/X86/linkage-name.ll
index cd8ac31..41aefa9 100644
--- a/llvm/test/DebugInfo/X86/linkage-name.ll
+++ b/llvm/test/DebugInfo/X86/linkage-name.ll
@@ -5,47 +5,57 @@
; CHECK-NOT: DW_AT_{{(MIPS_)?}}linkage_name
; CHECK: DW_AT_specification
+source_filename = "test/DebugInfo/X86/linkage-name.ll"
+
%class.A = type { i8 }
-@a = global %class.A zeroinitializer, align 1, !dbg !20
+@a = global %class.A zeroinitializer, align 1, !dbg !0
-define i32 @_ZN1A1aEi(%class.A* %this, i32 %b) nounwind uwtable ssp align 2 !dbg !5 {
+; Function Attrs: nounwind ssp uwtable
+define i32 @_ZN1A1aEi(%class.A* %this, i32 %b) #0 align 2 !dbg !14 {
entry:
%this.addr = alloca %class.A*, align 8
%b.addr = alloca i32, align 4
store %class.A* %this, %class.A** %this.addr, align 8
- call void @llvm.dbg.declare(metadata %class.A** %this.addr, metadata !21, metadata !DIExpression()), !dbg !23
+ call void @llvm.dbg.declare(metadata %class.A** %this.addr, metadata !15, metadata !17), !dbg !18
store i32 %b, i32* %b.addr, align 4
- call void @llvm.dbg.declare(metadata i32* %b.addr, metadata !24, metadata !DIExpression()), !dbg !25
+ call void @llvm.dbg.declare(metadata i32* %b.addr, metadata !19, metadata !17), !dbg !20
%this1 = load %class.A*, %class.A** %this.addr
- %0 = load i32, i32* %b.addr, align 4, !dbg !26
- ret i32 %0, !dbg !26
+ %0 = load i32, i32* %b.addr, align 4, !dbg !21
+ ret i32 %0, !dbg !21
}
-declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
+; Function Attrs: nounwind readnone
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!29}
+declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.1 (trunk 152691) (llvm/trunk 152692)", isOptimized: false, emissionKind: FullDebug, file: !28, enums: !1, retainedTypes: !1, globals: !18, imports: !1)
-!1 = !{}
-!5 = distinct !DISubprogram(name: "a", linkageName: "_ZN1A1aEi", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !6, scope: null, type: !7, declaration: !13)
-!6 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo")
-!7 = !DISubroutineType(types: !8)
-!8 = !{!9, !10, !9}
-!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!10 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial, baseType: !11)
-!11 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 1, size: 8, align: 8, file: !28, elements: !12)
-!12 = !{!13}
-!13 = !DISubprogram(name: "a", linkageName: "_ZN1A1aEi", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrivate | DIFlagPrototyped, isOptimized: false, file: !6, scope: !11, type: !7)
-!18 = !{!20}
-!20 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", line: 9, isLocal: false, isDefinition: true, scope: null, file: !6, type: !11))
-!21 = !DILocalVariable(name: "this", line: 5, arg: 1, flags: DIFlagArtificial, scope: !5, file: !6, type: !22)
-!22 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !11)
-!23 = !DILocation(line: 5, column: 8, scope: !5)
-!24 = !DILocalVariable(name: "b", line: 5, arg: 2, scope: !5, file: !6, type: !9)
-!25 = !DILocation(line: 5, column: 14, scope: !5)
-!26 = !DILocation(line: 6, column: 4, scope: !27)
-!27 = distinct !DILexicalBlock(line: 5, column: 17, file: !6, scope: !5)
-!28 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo")
-!29 = !{i32 1, !"Debug Info Version", i32 3}
+attributes #0 = { nounwind ssp uwtable }
+attributes #1 = { nounwind readnone }
+
+!llvm.dbg.cu = !{!10}
+!llvm.module.flags = !{!13}
+
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "a", scope: null, file: !2, line: 9, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "foo.cpp", directory: "/Users/echristo")
+!3 = !DICompositeType(tag: DW_TAG_class_type, name: "A", file: !2, line: 1, size: 8, align: 8, elements: !4)
+!4 = !{!5}
+!5 = !DISubprogram(name: "a", linkageName: "_ZN1A1aEi", scope: !3, file: !2, line: 2, type: !6, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrivate | DIFlagPrototyped, isOptimized: false)
+!6 = !DISubroutineType(types: !7)
+!7 = !{!8, !9, !8}
+!8 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !3, size: 64, align: 64, flags: DIFlagArtificial)
+!10 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.1 (trunk 152691) (llvm/trunk 152692)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !11, retainedTypes: !11, globals: !12, imports: !11)
+!11 = !{}
+!12 = !{!0}
+!13 = !{i32 1, !"Debug Info Version", i32 3}
+!14 = distinct !DISubprogram(name: "a", linkageName: "_ZN1A1aEi", scope: null, file: !2, line: 5, type: !6, isLocal: false, isDefinition: true, scopeLine: 5, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !10, declaration: !5)
+!15 = !DILocalVariable(name: "this", arg: 1, scope: !14, file: !2, line: 5, type: !16, flags: DIFlagArtificial)
+!16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !3, size: 64, align: 64)
+!17 = !DIExpression()
+!18 = !DILocation(line: 5, column: 8, scope: !14)
+!19 = !DILocalVariable(name: "b", arg: 2, scope: !14, file: !2, line: 5, type: !8)
+!20 = !DILocation(line: 5, column: 14, scope: !14)
+!21 = !DILocation(line: 6, column: 4, scope: !22)
+!22 = distinct !DILexicalBlock(scope: !14, file: !2, line: 5, column: 17)
+
diff --git a/llvm/test/DebugInfo/X86/live-debug-values.ll b/llvm/test/DebugInfo/X86/live-debug-values.ll
index a380ccb..b4091ec 100644
--- a/llvm/test/DebugInfo/X86/live-debug-values.ll
+++ b/llvm/test/DebugInfo/X86/live-debug-values.ll
@@ -36,100 +36,104 @@
; CHECK: movl %ecx, m(%rip)
; ModuleID = 'LiveDebugValues.c'
+source_filename = "test/DebugInfo/X86/live-debug-values.ll"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
-@m = common global i32 0, align 4, !dbg !16
+@m = common global i32 0, align 4, !dbg !0
@.str = private unnamed_addr constant [13 x i8] c"m(main): %d\0A\00", align 1
; Function Attrs: nounwind uwtable
-define i32 @main(i32 %argc, i8** nocapture readonly %argv) #0 !dbg !4 {
+define i32 @main(i32 %argc, i8** nocapture readonly %argv) #0 !dbg !10 {
entry:
- tail call void @llvm.dbg.value(metadata i32 %argc, i64 0, metadata !12, metadata !20), !dbg !21
- tail call void @llvm.dbg.value(metadata i8** %argv, i64 0, metadata !13, metadata !20), !dbg !22
+ tail call void @llvm.dbg.value(metadata i32 %argc, i64 0, metadata !17, metadata !20), !dbg !21
+ tail call void @llvm.dbg.value(metadata i8** %argv, i64 0, metadata !18, metadata !20), !dbg !22
%cmp = icmp eq i32 %argc, 2, !dbg !24
br i1 %cmp, label %if.else, label %if.end, !dbg !26
if.else: ; preds = %entry
%arrayidx = getelementptr inbounds i8*, i8** %argv, i64 1, !dbg !27
%0 = load i8*, i8** %arrayidx, align 8, !dbg !27, !tbaa !28
- %call = tail call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %0) #4, !dbg !32
- tail call void @llvm.dbg.value(metadata i32 %call, i64 0, metadata !14, metadata !20), !dbg !33
+ %call = tail call i32 (i8*, ...) bitcast (i32 (...)* @atoi to i32 (i8*, ...)*)(i8* %0) #1, !dbg !32
+ tail call void @llvm.dbg.value(metadata i32 %call, i64 0, metadata !19, metadata !20), !dbg !33
br label %if.end
-if.end: ; preds = %entry, %if.else
+if.end: ; preds = %if.else, %entry
%n.0 = phi i32 [ %call, %if.else ], [ 2, %entry ]
- %call1 = tail call i32 @change(i32 %n.0) #4, !dbg !34
- tail call void @llvm.dbg.value(metadata i32 %call1, i64 0, metadata !14, metadata !20), !dbg !33
+ %call1 = tail call i32 @change(i32 %n.0) #1, !dbg !34
+ tail call void @llvm.dbg.value(metadata i32 %call1, i64 0, metadata !19, metadata !20), !dbg !33
%cmp2 = icmp sgt i32 %call1, 10, !dbg !35
br i1 %cmp2, label %if.then.3, label %if.else.5, !dbg !37
if.then.3: ; preds = %if.end
- %call4 = tail call i32 @modify(i32 %call1) #4, !dbg !38
+ %call4 = tail call i32 @modify(i32 %call1) #1, !dbg !38
%add = add nsw i32 %call4, %call1, !dbg !40
br label %if.end.7, !dbg !41
if.else.5: ; preds = %if.end
- %call6 = tail call i32 @inc(i32 %call1) #4, !dbg !42
+ %call6 = tail call i32 @inc(i32 %call1) #1, !dbg !42
br label %if.end.7
if.end.7: ; preds = %if.else.5, %if.then.3
%storemerge = phi i32 [ %call6, %if.else.5 ], [ %add, %if.then.3 ]
store i32 %storemerge, i32* @m, align 4, !dbg !43, !tbaa !44
- %call8 = tail call i32 (i8*, ...) @printf(i8* nonnull getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %storemerge) #4, !dbg !46
+ %call8 = tail call i32 (i8*, ...) @printf(i8* nonnull getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %storemerge) #1, !dbg !46
ret i32 0, !dbg !47
}
+; Function Attrs: nounwind
declare i32 @atoi(...) #1
+; Function Attrs: nounwind
declare i32 @change(i32) #1
+; Function Attrs: nounwind
declare i32 @modify(i32) #1
+; Function Attrs: nounwind
declare i32 @inc(i32) #1
; Function Attrs: nounwind
-declare i32 @printf(i8* nocapture readonly, ...) #2
+declare i32 @printf(i8* nocapture readonly, ...) #1
; Function Attrs: nounwind readnone
-declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #3
+declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #2
attributes #0 = { nounwind uwtable }
attributes #1 = { nounwind }
-attributes #2 = { nounwind }
-attributes #3 = { nounwind readnone }
-attributes #4 = { nounwind }
+attributes #2 = { nounwind readnone }
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!17, !18}
-!llvm.ident = !{!19}
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!7, !8}
+!llvm.ident = !{!9}
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.8.0 (trunk 253049) ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, globals: !15)
-!1 = !DIFile(filename: "LiveDebugValues.c", directory: "/home/vt/julia/test/tvvikram")
-!2 = !{}
-!4 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 6, type: !5, isLocal: false, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !11)
-!5 = !DISubroutineType(types: !6)
-!6 = !{!7, !7, !8}
-!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!8 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !9, size: 64, align: 64)
-!9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10, size: 64, align: 64)
-!10 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
-!11 = !{!12, !13, !14}
-!12 = !DILocalVariable(name: "argc", arg: 1, scope: !4, file: !1, line: 6, type: !7)
-!13 = !DILocalVariable(name: "argv", arg: 2, scope: !4, file: !1, line: 6, type: !8)
-!14 = !DILocalVariable(name: "n", scope: !4, file: !1, line: 7, type: !7)
-!15 = !{!16}
-!16 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "m", scope: !0, file: !1, line: 2, type: !7, isLocal: false, isDefinition: true))
-!17 = !{i32 2, !"Dwarf Version", i32 4}
-!18 = !{i32 2, !"Debug Info Version", i32 3}
-!19 = !{!"clang version 3.8.0 (trunk 253049) "}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "m", scope: !2, file: !3, line: 2, type: !6, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 3.8.0 (trunk 253049) ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
+!3 = !DIFile(filename: "LiveDebugValues.c", directory: "/home/vt/julia/test/tvvikram")
+!4 = !{}
+!5 = !{!0}
+!6 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!7 = !{i32 2, !"Dwarf Version", i32 4}
+!8 = !{i32 2, !"Debug Info Version", i32 3}
+!9 = !{!"clang version 3.8.0 (trunk 253049) "}
+!10 = distinct !DISubprogram(name: "main", scope: !3, file: !3, line: 6, type: !11, isLocal: false, isDefinition: true, scopeLine: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, variables: !16)
+!11 = !DISubroutineType(types: !12)
+!12 = !{!6, !6, !13}
+!13 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !14, size: 64, align: 64)
+!14 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !15, size: 64, align: 64)
+!15 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
+!16 = !{!17, !18, !19}
+!17 = !DILocalVariable(name: "argc", arg: 1, scope: !10, file: !3, line: 6, type: !6)
+!18 = !DILocalVariable(name: "argv", arg: 2, scope: !10, file: !3, line: 6, type: !13)
+!19 = !DILocalVariable(name: "n", scope: !10, file: !3, line: 7, type: !6)
!20 = !DIExpression()
-!21 = !DILocation(line: 6, column: 14, scope: !4)
+!21 = !DILocation(line: 6, column: 14, scope: !10)
!22 = !DILocation(line: 6, column: 27, scope: !23)
-!23 = !DILexicalBlockFile(scope: !4, file: !1, discriminator: 1)
+!23 = !DILexicalBlockFile(scope: !10, file: !3, discriminator: 1)
!24 = !DILocation(line: 8, column: 12, scope: !25)
-!25 = distinct !DILexicalBlock(scope: !4, file: !1, line: 8, column: 7)
-!26 = !DILocation(line: 8, column: 7, scope: !4)
+!25 = distinct !DILexicalBlock(scope: !10, file: !3, line: 8, column: 7)
+!26 = !DILocation(line: 8, column: 7, scope: !10)
!27 = !DILocation(line: 11, column: 14, scope: !25)
!28 = !{!29, !29, i64 0}
!29 = !{!"any pointer", !30, i64 0}
@@ -137,17 +141,18 @@
!31 = !{!"Simple C/C++ TBAA"}
!32 = !DILocation(line: 11, column: 9, scope: !25)
!33 = !DILocation(line: 7, column: 7, scope: !23)
-!34 = !DILocation(line: 12, column: 7, scope: !4)
+!34 = !DILocation(line: 12, column: 7, scope: !10)
!35 = !DILocation(line: 13, column: 9, scope: !36)
-!36 = distinct !DILexicalBlock(scope: !4, file: !1, line: 13, column: 7)
-!37 = !DILocation(line: 13, column: 7, scope: !4)
+!36 = distinct !DILexicalBlock(scope: !10, file: !3, line: 13, column: 7)
+!37 = !DILocation(line: 13, column: 7, scope: !10)
!38 = !DILocation(line: 14, column: 9, scope: !39)
-!39 = distinct !DILexicalBlock(scope: !36, file: !1, line: 13, column: 15)
+!39 = distinct !DILexicalBlock(scope: !36, file: !3, line: 13, column: 15)
!40 = !DILocation(line: 15, column: 11, scope: !39)
!41 = !DILocation(line: 16, column: 3, scope: !39)
!42 = !DILocation(line: 18, column: 9, scope: !36)
!43 = !DILocation(line: 15, column: 7, scope: !39)
!44 = !{!45, !45, i64 0}
!45 = !{!"int", !30, i64 0}
-!46 = !DILocation(line: 19, column: 3, scope: !4)
-!47 = !DILocation(line: 20, column: 3, scope: !4)
+!46 = !DILocation(line: 19, column: 3, scope: !10)
+!47 = !DILocation(line: 20, column: 3, scope: !10)
+
diff --git a/llvm/test/DebugInfo/X86/memberfnptr.ll b/llvm/test/DebugInfo/X86/memberfnptr.ll
index 5c646a4..0065b1d 100644
--- a/llvm/test/DebugInfo/X86/memberfnptr.ll
+++ b/llvm/test/DebugInfo/X86/memberfnptr.ll
@@ -11,34 +11,36 @@
; CHECK: DW_TAG
;
; ModuleID = 'memberfnptr.cpp'
+source_filename = "test/DebugInfo/X86/memberfnptr.ll"
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx"
%struct.A = type { i8 }
-@p = global { i64, i64 } { i64 ptrtoint (void (%struct.A*)* @_ZN1A3fooEv to i64), i64 0 }, align 8, !dbg !11
+@p = global { i64, i64 } { i64 ptrtoint (void (%struct.A*)* @_ZN1A3fooEv to i64), i64 0 }, align 8, !dbg !0
declare void @_ZN1A3fooEv(%struct.A*)
-!llvm.dbg.cu = !{!0}
+!llvm.dbg.cu = !{!10}
!llvm.module.flags = !{!14, !15, !16}
!llvm.ident = !{!17}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !10, imports: !2)
-!1 = !DIFile(filename: "memberfnptr.cpp", directory: "")
-!2 = !{}
-!3 = !{!4}
-!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", line: 1, size: 8, align: 8, file: !1, elements: !5, identifier: "_ZTS1A")
-!5 = !{!6}
-!6 = !DISubprogram(name: "foo", linkageName: "_ZN1A3fooEv", line: 2, isLocal: false, isDefinition: false, flags: DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !4, type: !7)
-!7 = !DISubroutineType(types: !8)
-!8 = !{null, !9}
-!9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !4)
-!10 = !{!11}
-!11 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "p", line: 5, isLocal: false, isDefinition: true, scope: null, file: !12, type: !13))
-!12 = !DIFile(filename: "memberfnptr.cpp", directory: "")
-!13 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, size: 64, baseType: !7, extraData: !4)
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "p", scope: null, file: !2, line: 5, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "memberfnptr.cpp", directory: "")
+!3 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !4, size: 64, extraData: !7)
+!4 = !DISubroutineType(types: !5)
+!5 = !{null, !6}
+!6 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !2, line: 1, size: 8, align: 8, elements: !8, identifier: "_ZTS1A")
+!8 = !{!9}
+!9 = !DISubprogram(name: "foo", linkageName: "_ZN1A3fooEv", scope: !7, file: !2, line: 2, type: !4, isLocal: false, isDefinition: false, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: false)
+!10 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.6.0 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !11, retainedTypes: !12, globals: !13, imports: !11)
+!11 = !{}
+!12 = !{!7}
+!13 = !{!0}
!14 = !{i32 2, !"Dwarf Version", i32 2}
!15 = !{i32 2, !"Debug Info Version", i32 3}
!16 = !{i32 1, !"PIC Level", i32 2}
!17 = !{!"clang version 3.6.0 "}
+
diff --git a/llvm/test/DebugInfo/X86/misched-dbg-value.ll b/llvm/test/DebugInfo/X86/misched-dbg-value.ll
index 9ea7c94..a3df3b4 100644
--- a/llvm/test/DebugInfo/X86/misched-dbg-value.ll
+++ b/llvm/test/DebugInfo/X86/misched-dbg-value.ll
@@ -34,152 +34,166 @@
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_name {{.*}} "IntParI2"
+source_filename = "test/DebugInfo/X86/misched-dbg-value.ll"
+
%struct.Record = type { %struct.Record*, i32, i32, i32, [31 x i8] }
-@Version = global [4 x i8] c"1.1\00", align 1, !dbg !30
-@IntGlob = common global i32 0, align 4, !dbg !35
-@BoolGlob = common global i32 0, align 4, !dbg !36
-@Char1Glob = common global i8 0, align 1, !dbg !38
-@Char2Glob = common global i8 0, align 1, !dbg !39
-@Array1Glob = common global [51 x i32] zeroinitializer, align 16, !dbg !40
-@Array2Glob = common global [51 x [51 x i32]] zeroinitializer, align 16, !dbg !42
-@PtrGlb = common global %struct.Record* null, align 8, !dbg !46
-@PtrGlbNext = common global %struct.Record* null, align 8, !dbg !63
+@Version = global [4 x i8] c"1.1\00", align 1, !dbg !0
+@IntGlob = common global i32 0, align 4, !dbg !7
+@BoolGlob = common global i32 0, align 4, !dbg !10
+@Char1Glob = common global i8 0, align 1, !dbg !13
+@Char2Glob = common global i8 0, align 1, !dbg !15
+@Array1Glob = common global [51 x i32] zeroinitializer, align 16, !dbg !17
+@Array2Glob = common global [51 x [51 x i32]] zeroinitializer, align 16, !dbg !23
+@PtrGlb = common global %struct.Record* null, align 8, !dbg !28
+@PtrGlbNext = common global %struct.Record* null, align 8, !dbg !54
-define void @Proc8(i32* nocapture %Array1Par, [51 x i32]* nocapture %Array2Par, i32 %IntParI1, i32 %IntParI2) nounwind optsize !dbg !12 {
+; Function Attrs: nounwind optsize
+define void @Proc8(i32* nocapture %Array1Par, [51 x i32]* nocapture %Array2Par, i32 %IntParI1, i32 %IntParI2) #0 !dbg !61 {
entry:
- tail call void @llvm.dbg.value(metadata i32* %Array1Par, i64 0, metadata !23, metadata !DIExpression()), !dbg !64
- tail call void @llvm.dbg.value(metadata [51 x i32]* %Array2Par, i64 0, metadata !24, metadata !DIExpression()), !dbg !65
- tail call void @llvm.dbg.value(metadata i32 %IntParI1, i64 0, metadata !25, metadata !DIExpression()), !dbg !66
- tail call void @llvm.dbg.value(metadata i32 %IntParI2, i64 0, metadata !26, metadata !DIExpression()), !dbg !67
- %add = add i32 %IntParI1, 5, !dbg !68
- tail call void @llvm.dbg.value(metadata i32 %add, i64 0, metadata !27, metadata !DIExpression()), !dbg !68
- %idxprom = sext i32 %add to i64, !dbg !69
- %arrayidx = getelementptr inbounds i32, i32* %Array1Par, i64 %idxprom, !dbg !69
- store i32 %IntParI2, i32* %arrayidx, align 4, !dbg !69
- %add3 = add nsw i32 %IntParI1, 6, !dbg !73
- %idxprom4 = sext i32 %add3 to i64, !dbg !73
- %arrayidx5 = getelementptr inbounds i32, i32* %Array1Par, i64 %idxprom4, !dbg !73
- store i32 %IntParI2, i32* %arrayidx5, align 4, !dbg !73
- %add6 = add nsw i32 %IntParI1, 35, !dbg !74
- %idxprom7 = sext i32 %add6 to i64, !dbg !74
- %arrayidx8 = getelementptr inbounds i32, i32* %Array1Par, i64 %idxprom7, !dbg !74
- store i32 %add, i32* %arrayidx8, align 4, !dbg !74
- tail call void @llvm.dbg.value(metadata i32 %add, i64 0, metadata !28, metadata !DIExpression()), !dbg !75
- br label %for.body, !dbg !75
+ tail call void @llvm.dbg.value(metadata i32* %Array1Par, i64 0, metadata !67, metadata !73), !dbg !74
+ tail call void @llvm.dbg.value(metadata [51 x i32]* %Array2Par, i64 0, metadata !68, metadata !73), !dbg !75
+ tail call void @llvm.dbg.value(metadata i32 %IntParI1, i64 0, metadata !69, metadata !73), !dbg !76
+ tail call void @llvm.dbg.value(metadata i32 %IntParI2, i64 0, metadata !70, metadata !73), !dbg !77
+ %add = add i32 %IntParI1, 5, !dbg !78
+ tail call void @llvm.dbg.value(metadata i32 %add, i64 0, metadata !71, metadata !73), !dbg !78
+ %idxprom = sext i32 %add to i64, !dbg !79
+ %arrayidx = getelementptr inbounds i32, i32* %Array1Par, i64 %idxprom, !dbg !79
+ store i32 %IntParI2, i32* %arrayidx, align 4, !dbg !79
+ %add3 = add nsw i32 %IntParI1, 6, !dbg !80
+ %idxprom4 = sext i32 %add3 to i64, !dbg !80
+ %arrayidx5 = getelementptr inbounds i32, i32* %Array1Par, i64 %idxprom4, !dbg !80
+ store i32 %IntParI2, i32* %arrayidx5, align 4, !dbg !80
+ %add6 = add nsw i32 %IntParI1, 35, !dbg !81
+ %idxprom7 = sext i32 %add6 to i64, !dbg !81
+ %arrayidx8 = getelementptr inbounds i32, i32* %Array1Par, i64 %idxprom7, !dbg !81
+ store i32 %add, i32* %arrayidx8, align 4, !dbg !81
+ tail call void @llvm.dbg.value(metadata i32 %add, i64 0, metadata !72, metadata !73), !dbg !82
+ br label %for.body, !dbg !82
-for.body: ; preds = %entry, %for.body
+for.body: ; preds = %for.body, %entry
%indvars.iv = phi i64 [ %idxprom, %entry ], [ %indvars.iv.next, %for.body ]
%IntIndex.046 = phi i32 [ %add, %entry ], [ %inc, %for.body ]
- %arrayidx13 = getelementptr inbounds [51 x i32], [51 x i32]* %Array2Par, i64 %idxprom, i64 %indvars.iv, !dbg !77
- store i32 %add, i32* %arrayidx13, align 4, !dbg !77
- %inc = add nsw i32 %IntIndex.046, 1, !dbg !75
- tail call void @llvm.dbg.value(metadata i32 %inc, i64 0, metadata !28, metadata !DIExpression()), !dbg !75
- %cmp = icmp sgt i32 %inc, %add3, !dbg !75
- %indvars.iv.next = add i64 %indvars.iv, 1, !dbg !75
- br i1 %cmp, label %for.end, label %for.body, !dbg !75
+ %arrayidx13 = getelementptr inbounds [51 x i32], [51 x i32]* %Array2Par, i64 %idxprom, i64 %indvars.iv, !dbg !84
+ store i32 %add, i32* %arrayidx13, align 4, !dbg !84
+ %inc = add nsw i32 %IntIndex.046, 1, !dbg !82
+ tail call void @llvm.dbg.value(metadata i32 %inc, i64 0, metadata !72, metadata !73), !dbg !82
+ %cmp = icmp sgt i32 %inc, %add3, !dbg !82
+ %indvars.iv.next = add i64 %indvars.iv, 1, !dbg !82
+ br i1 %cmp, label %for.end, label %for.body, !dbg !82
for.end: ; preds = %for.body
- %sub = add nsw i32 %IntParI1, 4, !dbg !78
- %idxprom14 = sext i32 %sub to i64, !dbg !78
- %arrayidx17 = getelementptr inbounds [51 x i32], [51 x i32]* %Array2Par, i64 %idxprom, i64 %idxprom14, !dbg !78
- %0 = load i32, i32* %arrayidx17, align 4, !dbg !78
- %inc18 = add nsw i32 %0, 1, !dbg !78
- store i32 %inc18, i32* %arrayidx17, align 4, !dbg !78
- %1 = load i32, i32* %arrayidx, align 4, !dbg !79
- %add22 = add nsw i32 %IntParI1, 25, !dbg !79
- %idxprom23 = sext i32 %add22 to i64, !dbg !79
- %arrayidx25 = getelementptr inbounds [51 x i32], [51 x i32]* %Array2Par, i64 %idxprom23, i64 %idxprom, !dbg !79
- store i32 %1, i32* %arrayidx25, align 4, !dbg !79
- store i32 5, i32* @IntGlob, align 4, !dbg !80
- ret void, !dbg !81
+ %sub = add nsw i32 %IntParI1, 4, !dbg !85
+ %idxprom14 = sext i32 %sub to i64, !dbg !85
+ %arrayidx17 = getelementptr inbounds [51 x i32], [51 x i32]* %Array2Par, i64 %idxprom, i64 %idxprom14, !dbg !85
+ %0 = load i32, i32* %arrayidx17, align 4, !dbg !85
+ %inc18 = add nsw i32 %0, 1, !dbg !85
+ store i32 %inc18, i32* %arrayidx17, align 4, !dbg !85
+ %1 = load i32, i32* %arrayidx, align 4, !dbg !86
+ %add22 = add nsw i32 %IntParI1, 25, !dbg !86
+ %idxprom23 = sext i32 %add22 to i64, !dbg !86
+ %arrayidx25 = getelementptr inbounds [51 x i32], [51 x i32]* %Array2Par, i64 %idxprom23, i64 %idxprom, !dbg !86
+ store i32 %1, i32* %arrayidx25, align 4, !dbg !86
+ store i32 5, i32* @IntGlob, align 4, !dbg !87
+ ret void, !dbg !88
}
-declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone
+; Function Attrs: nounwind readnone
+declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #1
-attributes #0 = { nounwind optsize ssp uwtable }
+attributes #0 = { nounwind optsize }
attributes #1 = { nounwind readnone }
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!83}
+!llvm.dbg.cu = !{!56}
+!llvm.module.flags = !{!60}
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 (trunk 175015)", isOptimized: true, emissionKind: FullDebug, file: !82, enums: !1, retainedTypes: !10, globals: !29, imports: !10)
-!1 = !{!2}
-!2 = !DICompositeType(tag: DW_TAG_enumeration_type, line: 128, size: 32, align: 32, file: !82, elements: !4)
-!3 = !DIFile(filename: "dry.c", directory: "/Users/manmanren/test-Nov/rdar_13183203/test2")
-!4 = !{!5, !6, !7, !8, !9}
-!5 = !DIEnumerator(name: "Ident1", value: 0) ; [ DW_TAG_enumerator ] [Ident1 :: 0]
-!6 = !DIEnumerator(name: "Ident2", value: 10000) ; [ DW_TAG_enumerator ] [Ident2 :: 10000]
-!7 = !DIEnumerator(name: "Ident3", value: 10001) ; [ DW_TAG_enumerator ] [Ident3 :: 10001]
-!8 = !DIEnumerator(name: "Ident4", value: 10002) ; [ DW_TAG_enumerator ] [Ident4 :: 10002]
-!9 = !DIEnumerator(name: "Ident5", value: 10003) ; [ DW_TAG_enumerator ] [Ident5 :: 10003]
-!10 = !{}
-!12 = distinct !DISubprogram(name: "Proc8", line: 180, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, unit: !0, scopeLine: 185, file: !82, scope: !3, type: !13, variables: !22)
-!13 = !DISubroutineType(types: !14)
-!14 = !{null, !15, !17, !21, !21}
-!15 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !16)
-!16 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !18)
-!18 = !DICompositeType(tag: DW_TAG_array_type, size: 1632, align: 32, baseType: !16, elements: !19)
-!19 = !{!20}
-!20 = !DISubrange(count: 51)
-!21 = !DIDerivedType(tag: DW_TAG_typedef, name: "OneToFifty", line: 132, file: !82, baseType: !16)
-!22 = !{!23, !24, !25, !26, !27, !28}
-!23 = !DILocalVariable(name: "Array1Par", line: 181, arg: 1, scope: !12, file: !3, type: !15)
-!24 = !DILocalVariable(name: "Array2Par", line: 182, arg: 2, scope: !12, file: !3, type: !17)
-!25 = !DILocalVariable(name: "IntParI1", line: 183, arg: 3, scope: !12, file: !3, type: !21)
-!26 = !DILocalVariable(name: "IntParI2", line: 184, arg: 4, scope: !12, file: !3, type: !21)
-!27 = !DILocalVariable(name: "IntLoc", line: 186, scope: !12, file: !3, type: !21)
-!28 = !DILocalVariable(name: "IntIndex", line: 187, scope: !12, file: !3, type: !21)
-!29 = !{!30, !35, !36, !38, !39, !40, !42, !46, !63}
-!30 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "Version", line: 111, isLocal: false, isDefinition: true, scope: null, file: !3, type: !31))
-!31 = !DICompositeType(tag: DW_TAG_array_type, size: 32, align: 8, baseType: !32, elements: !33)
-!32 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
-!33 = !{!34}
-!34 = !DISubrange(count: 4)
-!35 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "IntGlob", line: 171, isLocal: false, isDefinition: true, scope: null, file: !3, type: !16))
-!36 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "BoolGlob", line: 172, isLocal: false, isDefinition: true, scope: null, file: !3, type: !37))
-!37 = !DIDerivedType(tag: DW_TAG_typedef, name: "boolean", line: 149, file: !82, baseType: !16)
-!38 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "Char1Glob", line: 173, isLocal: false, isDefinition: true, scope: null, file: !3, type: !32))
-!39 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "Char2Glob", line: 174, isLocal: false, isDefinition: true, scope: null, file: !3, type: !32))
-!40 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "Array1Glob", line: 175, isLocal: false, isDefinition: true, scope: null, file: !3, type: !41))
-!41 = !DIDerivedType(tag: DW_TAG_typedef, name: "Array1Dim", line: 135, file: !82, baseType: !18)
-!42 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "Array2Glob", line: 176, isLocal: false, isDefinition: true, scope: null, file: !3, type: !43))
-!43 = !DIDerivedType(tag: DW_TAG_typedef, name: "Array2Dim", line: 136, file: !82, baseType: !44)
-!44 = !DICompositeType(tag: DW_TAG_array_type, size: 83232, align: 32, baseType: !16, elements: !45)
-!45 = !{!20, !20}
-!46 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "PtrGlb", line: 177, isLocal: false, isDefinition: true, scope: null, file: !3, type: !47))
-!47 = !DIDerivedType(tag: DW_TAG_typedef, name: "RecordPtr", line: 148, file: !82, baseType: !48)
-!48 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !49)
-!49 = !DIDerivedType(tag: DW_TAG_typedef, name: "RecordType", line: 147, file: !82, baseType: !50)
-!50 = !DICompositeType(tag: DW_TAG_structure_type, name: "Record", line: 138, size: 448, align: 64, file: !82, elements: !51)
-!51 = !{!52, !54, !56, !57, !58}
-!52 = !DIDerivedType(tag: DW_TAG_member, name: "PtrComp", line: 140, size: 64, align: 64, file: !82, scope: !50, baseType: !53)
-!53 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !50)
-!54 = !DIDerivedType(tag: DW_TAG_member, name: "Discr", line: 141, size: 32, align: 32, offset: 64, file: !82, scope: !50, baseType: !55)
-!55 = !DIDerivedType(tag: DW_TAG_typedef, name: "Enumeration", line: 128, file: !82, baseType: !2)
-!56 = !DIDerivedType(tag: DW_TAG_member, name: "EnumComp", line: 142, size: 32, align: 32, offset: 96, file: !82, scope: !50, baseType: !55)
-!57 = !DIDerivedType(tag: DW_TAG_member, name: "IntComp", line: 143, size: 32, align: 32, offset: 128, file: !82, scope: !50, baseType: !21)
-!58 = !DIDerivedType(tag: DW_TAG_member, name: "StringComp", line: 144, size: 248, align: 8, offset: 160, file: !82, scope: !50, baseType: !59)
-!59 = !DIDerivedType(tag: DW_TAG_typedef, name: "String30", line: 134, file: !82, baseType: !60)
-!60 = !DICompositeType(tag: DW_TAG_array_type, size: 248, align: 8, baseType: !32, elements: !61)
-!61 = !{!62}
-!62 = !DISubrange(count: 31)
-!63 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "PtrGlbNext", line: 178, isLocal: false, isDefinition: true, scope: null, file: !3, type: !47))
-!64 = !DILocation(line: 181, scope: !12)
-!65 = !DILocation(line: 182, scope: !12)
-!66 = !DILocation(line: 183, scope: !12)
-!67 = !DILocation(line: 184, scope: !12)
-!68 = !DILocation(line: 189, scope: !12)
-!69 = !DILocation(line: 190, scope: !12)
-!73 = !DILocation(line: 191, scope: !12)
-!74 = !DILocation(line: 192, scope: !12)
-!75 = !DILocation(line: 193, scope: !76)
-!76 = distinct !DILexicalBlock(line: 193, column: 0, file: !82, scope: !12)
-!77 = !DILocation(line: 194, scope: !76)
-!78 = !DILocation(line: 195, scope: !12)
-!79 = !DILocation(line: 196, scope: !12)
-!80 = !DILocation(line: 197, scope: !12)
-!81 = !DILocation(line: 198, scope: !12)
-!82 = !DIFile(filename: "dry.c", directory: "/Users/manmanren/test-Nov/rdar_13183203/test2")
-!83 = !{i32 1, !"Debug Info Version", i32 3}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "Version", scope: null, file: !2, line: 111, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "dry.c", directory: "/Users/manmanren/test-Nov/rdar_13183203/test2")
+!3 = !DICompositeType(tag: DW_TAG_array_type, baseType: !4, size: 32, align: 8, elements: !5)
+!4 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
+!5 = !{!6}
+!6 = !DISubrange(count: 4) ; [ DW_TAG_enumerator ] [Ident1 :: 0]
+!7 = !DIGlobalVariableExpression(var: !8) ; [ DW_TAG_enumerator ] [Ident2 :: 10000]
+!8 = !DIGlobalVariable(name: "IntGlob", scope: null, file: !2, line: 171, type: !9, isLocal: false, isDefinition: true) ; [ DW_TAG_enumerator ] [Ident3 :: 10001]
+!9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) ; [ DW_TAG_enumerator ] [Ident4 :: 10002]
+!10 = !DIGlobalVariableExpression(var: !11) ; [ DW_TAG_enumerator ] [Ident5 :: 10003]
+!11 = !DIGlobalVariable(name: "BoolGlob", scope: null, file: !2, line: 172, type: !12, isLocal: false, isDefinition: true)
+!12 = !DIDerivedType(tag: DW_TAG_typedef, name: "boolean", file: !2, line: 149, baseType: !9)
+!13 = !DIGlobalVariableExpression(var: !14)
+!14 = !DIGlobalVariable(name: "Char1Glob", scope: null, file: !2, line: 173, type: !4, isLocal: false, isDefinition: true)
+!15 = !DIGlobalVariableExpression(var: !16)
+!16 = !DIGlobalVariable(name: "Char2Glob", scope: null, file: !2, line: 174, type: !4, isLocal: false, isDefinition: true)
+!17 = !DIGlobalVariableExpression(var: !18)
+!18 = !DIGlobalVariable(name: "Array1Glob", scope: null, file: !2, line: 175, type: !19, isLocal: false, isDefinition: true)
+!19 = !DIDerivedType(tag: DW_TAG_typedef, name: "Array1Dim", file: !2, line: 135, baseType: !20)
+!20 = !DICompositeType(tag: DW_TAG_array_type, baseType: !9, size: 1632, align: 32, elements: !21)
+!21 = !{!22}
+!22 = !DISubrange(count: 51)
+!23 = !DIGlobalVariableExpression(var: !24)
+!24 = !DIGlobalVariable(name: "Array2Glob", scope: null, file: !2, line: 176, type: !25, isLocal: false, isDefinition: true)
+!25 = !DIDerivedType(tag: DW_TAG_typedef, name: "Array2Dim", file: !2, line: 136, baseType: !26)
+!26 = !DICompositeType(tag: DW_TAG_array_type, baseType: !9, size: 83232, align: 32, elements: !27)
+!27 = !{!22, !22}
+!28 = !DIGlobalVariableExpression(var: !29)
+!29 = !DIGlobalVariable(name: "PtrGlb", scope: null, file: !2, line: 177, type: !30, isLocal: false, isDefinition: true)
+!30 = !DIDerivedType(tag: DW_TAG_typedef, name: "RecordPtr", file: !2, line: 148, baseType: !31)
+!31 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !32, size: 64, align: 64)
+!32 = !DIDerivedType(tag: DW_TAG_typedef, name: "RecordType", file: !2, line: 147, baseType: !33)
+!33 = !DICompositeType(tag: DW_TAG_structure_type, name: "Record", file: !2, line: 138, size: 448, align: 64, elements: !34)
+!34 = !{!35, !37, !46, !47, !49}
+!35 = !DIDerivedType(tag: DW_TAG_member, name: "PtrComp", scope: !33, file: !2, line: 140, baseType: !36, size: 64, align: 64)
+!36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !33, size: 64, align: 64)
+!37 = !DIDerivedType(tag: DW_TAG_member, name: "Discr", scope: !33, file: !2, line: 141, baseType: !38, size: 32, align: 32, offset: 64)
+!38 = !DIDerivedType(tag: DW_TAG_typedef, name: "Enumeration", file: !2, line: 128, baseType: !39)
+!39 = !DICompositeType(tag: DW_TAG_enumeration_type, file: !2, line: 128, size: 32, align: 32, elements: !40)
+!40 = !{!41, !42, !43, !44, !45}
+!41 = !DIEnumerator(name: "Ident1", value: 0)
+!42 = !DIEnumerator(name: "Ident2", value: 10000)
+!43 = !DIEnumerator(name: "Ident3", value: 10001)
+!44 = !DIEnumerator(name: "Ident4", value: 10002)
+!45 = !DIEnumerator(name: "Ident5", value: 10003)
+!46 = !DIDerivedType(tag: DW_TAG_member, name: "EnumComp", scope: !33, file: !2, line: 142, baseType: !38, size: 32, align: 32, offset: 96)
+!47 = !DIDerivedType(tag: DW_TAG_member, name: "IntComp", scope: !33, file: !2, line: 143, baseType: !48, size: 32, align: 32, offset: 128)
+!48 = !DIDerivedType(tag: DW_TAG_typedef, name: "OneToFifty", file: !2, line: 132, baseType: !9)
+!49 = !DIDerivedType(tag: DW_TAG_member, name: "StringComp", scope: !33, file: !2, line: 144, baseType: !50, size: 248, align: 8, offset: 160)
+!50 = !DIDerivedType(tag: DW_TAG_typedef, name: "String30", file: !2, line: 134, baseType: !51)
+!51 = !DICompositeType(tag: DW_TAG_array_type, baseType: !4, size: 248, align: 8, elements: !52)
+!52 = !{!53}
+!53 = !DISubrange(count: 31)
+!54 = !DIGlobalVariableExpression(var: !55)
+!55 = !DIGlobalVariable(name: "PtrGlbNext", scope: null, file: !2, line: 178, type: !30, isLocal: false, isDefinition: true)
+!56 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 3.3 (trunk 175015)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !57, retainedTypes: !58, globals: !59, imports: !58)
+!57 = !{!39}
+!58 = !{}
+!59 = !{!0, !7, !10, !13, !15, !17, !23, !28, !54}
+!60 = !{i32 1, !"Debug Info Version", i32 3}
+!61 = distinct !DISubprogram(name: "Proc8", scope: !2, file: !2, line: 180, type: !62, isLocal: false, isDefinition: true, scopeLine: 185, virtualIndex: 6, isOptimized: true, unit: !56, variables: !66)
+!62 = !DISubroutineType(types: !63)
+!63 = !{null, !64, !65, !48, !48}
+!64 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !9, size: 64, align: 64)
+!65 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !20, size: 64, align: 64)
+!66 = !{!67, !68, !69, !70, !71, !72}
+!67 = !DILocalVariable(name: "Array1Par", arg: 1, scope: !61, file: !2, line: 181, type: !64)
+!68 = !DILocalVariable(name: "Array2Par", arg: 2, scope: !61, file: !2, line: 182, type: !65)
+!69 = !DILocalVariable(name: "IntParI1", arg: 3, scope: !61, file: !2, line: 183, type: !48)
+!70 = !DILocalVariable(name: "IntParI2", arg: 4, scope: !61, file: !2, line: 184, type: !48)
+!71 = !DILocalVariable(name: "IntLoc", scope: !61, file: !2, line: 186, type: !48)
+!72 = !DILocalVariable(name: "IntIndex", scope: !61, file: !2, line: 187, type: !48)
+!73 = !DIExpression()
+!74 = !DILocation(line: 181, scope: !61)
+!75 = !DILocation(line: 182, scope: !61)
+!76 = !DILocation(line: 183, scope: !61)
+!77 = !DILocation(line: 184, scope: !61)
+!78 = !DILocation(line: 189, scope: !61)
+!79 = !DILocation(line: 190, scope: !61)
+!80 = !DILocation(line: 191, scope: !61)
+!81 = !DILocation(line: 192, scope: !61)
+!82 = !DILocation(line: 193, scope: !83)
+!83 = distinct !DILexicalBlock(scope: !61, file: !2, line: 193)
+!84 = !DILocation(line: 194, scope: !83)
+!85 = !DILocation(line: 195, scope: !61)
+!86 = !DILocation(line: 196, scope: !61)
+!87 = !DILocation(line: 197, scope: !61)
+!88 = !DILocation(line: 198, scope: !61)
+
diff --git a/llvm/test/DebugInfo/X86/multiple-aranges.ll b/llvm/test/DebugInfo/X86/multiple-aranges.ll
index 6972079..6fe2e30 100644
--- a/llvm/test/DebugInfo/X86/multiple-aranges.ll
+++ b/llvm/test/DebugInfo/X86/multiple-aranges.ll
@@ -26,35 +26,33 @@
; CHECK-NEXT: .quad 0 # ARange terminator
; CHECK-NEXT: .quad 0
-
; Generated from: clang -c -g -emit-llvm
; llvm-link test1.bc test2.bc -o test.bc
; test1.c: int kittens = 4;
; test2.c: int rainbows = 5;
-
-
-
; ModuleID = 'test.bc'
+source_filename = "test/DebugInfo/X86/multiple-aranges.ll"
target triple = "x86_64-unknown-linux-gnu"
-@kittens = global i32 4, align 4, !dbg !4
-@rainbows = global i32 5, align 4, !dbg !10
+@kittens = global i32 4, align 4, !dbg !0
+@rainbows = global i32 5, align 4, !dbg !4
-!llvm.dbg.cu = !{!0, !7}
+!llvm.dbg.cu = !{!7, !10}
!llvm.module.flags = !{!12, !13}
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !3, imports: !2)
-!1 = !DIFile(filename: "test1.c", directory: "/home/kayamon")
-!2 = !{}
-!3 = !{!4}
-!4 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "kittens", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !6))
-!5 = !DIFile(filename: "test1.c", directory: "/home/kayamon")
-!6 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!7 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.4 ", isOptimized: false, emissionKind: FullDebug, file: !8, enums: !2, retainedTypes: !2, globals: !9, imports: !2)
-!8 = !DIFile(filename: "test2.c", directory: "/home/kayamon")
-!9 = !{!10}
-!10 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "rainbows", line: 1, isLocal: false, isDefinition: true, scope: null, file: !11, type: !6))
-!11 = !DIFile(filename: "test2.c", directory: "/home/kayamon")
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "kittens", scope: null, file: !2, line: 1, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "test1.c", directory: "/home/kayamon")
+!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!4 = !DIGlobalVariableExpression(var: !5)
+!5 = !DIGlobalVariable(name: "rainbows", scope: null, file: !6, line: 1, type: !3, isLocal: false, isDefinition: true)
+!6 = !DIFile(filename: "test2.c", directory: "/home/kayamon")
+!7 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 3.4 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !8, retainedTypes: !8, globals: !9, imports: !8)
+!8 = !{}
+!9 = !{!0}
+!10 = distinct !DICompileUnit(language: DW_LANG_C99, file: !6, producer: "clang version 3.4 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !8, retainedTypes: !8, globals: !11, imports: !8)
+!11 = !{!4}
!12 = !{i32 2, !"Dwarf Version", i32 4}
!13 = !{i32 1, !"Debug Info Version", i32 3}
+
diff --git a/llvm/test/DebugInfo/X86/nondefault-subrange-array.ll b/llvm/test/DebugInfo/X86/nondefault-subrange-array.ll
index 3b734b9..cbe23f3 100644
--- a/llvm/test/DebugInfo/X86/nondefault-subrange-array.ll
+++ b/llvm/test/DebugInfo/X86/nondefault-subrange-array.ll
@@ -1,10 +1,11 @@
; RUN: llc -mtriple=x86_64-apple-darwin -O0 -filetype=obj -o %t < %s
; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
+source_filename = "test/DebugInfo/X86/nondefault-subrange-array.ll"
+
%class.A = type { [42 x i32] }
-@a = global %class.A zeroinitializer, align 4, !dbg !5
-
+@a = global %class.A zeroinitializer, align 4, !dbg !0
; Check that we can handle non-default array bounds. In this case, the array
; goes from [-3, 38].
@@ -27,24 +28,25 @@
; CHECK-NEXT: DW_AT_byte_size [DW_FORM_data1] (0x08)
; CHECK-NEXT: DW_AT_encoding [DW_FORM_data1] (DW_ATE_unsigned)
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!21}
+!llvm.dbg.cu = !{!14}
+!llvm.module.flags = !{!17}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 169136)", isOptimized: false, emissionKind: FullDebug, file: !20, enums: !1, retainedTypes: !1, globals: !3, imports: !1)
-!1 = !{}
-!3 = !{!5}
-!5 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7))
-!6 = !DIFile(filename: "t.cpp", directory: "/Volumes/Sandbox/llvm")
-!7 = !DICompositeType(tag: DW_TAG_class_type, name: "A", line: 1, align: 32, file: !20, elements: !8)
-!8 = !{!9, !14}
-!9 = !DIDerivedType(tag: DW_TAG_member, name: "x", line: 1, flags: DIFlagPrivate, file: !20, scope: !7, baseType: !10)
-!10 = !DICompositeType(tag: DW_TAG_array_type, align: 32, baseType: !11, elements: !12)
-!11 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!12 = !{!13}
-!13 = !DISubrange(count: 42, lowerBound: -3)
-!14 = !DISubprogram(name: "A", line: 1, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 1, file: !6, scope: !7, type: !15)
-!15 = !DISubroutineType(types: !16)
-!16 = !{null, !17}
-!17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !7)
-!20 = !DIFile(filename: "t.cpp", directory: "/Volumes/Sandbox/llvm")
-!21 = !{i32 1, !"Debug Info Version", i32 3}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "a", scope: null, file: !2, line: 1, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "t.cpp", directory: "/Volumes/Sandbox/llvm")
+!3 = !DICompositeType(tag: DW_TAG_class_type, name: "A", file: !2, line: 1, align: 32, elements: !4)
+!4 = !{!5, !10}
+!5 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !3, file: !2, line: 1, baseType: !6, flags: DIFlagPrivate)
+!6 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, align: 32, elements: !8)
+!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!8 = !{!9}
+!9 = !DISubrange(count: 42, lowerBound: -3)
+!10 = !DISubprogram(name: "A", scope: !3, file: !2, line: 1, type: !11, isLocal: false, isDefinition: false, scopeLine: 1, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false)
+!11 = !DISubroutineType(types: !12)
+!12 = !{null, !13}
+!13 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !3, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!14 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.3 (trunk 169136)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !15, retainedTypes: !15, globals: !16, imports: !15)
+!15 = !{}
+!16 = !{!0}
+!17 = !{i32 1, !"Debug Info Version", i32 3}
+
diff --git a/llvm/test/DebugInfo/X86/objc-fwd-decl.ll b/llvm/test/DebugInfo/X86/objc-fwd-decl.ll
index 0b7db01..0f63fe2 100644
--- a/llvm/test/DebugInfo/X86/objc-fwd-decl.ll
+++ b/llvm/test/DebugInfo/X86/objc-fwd-decl.ll
@@ -5,23 +5,27 @@
; CHECK: DW_AT_declaration
; CHECK: DW_AT_APPLE_runtime_class
+source_filename = "test/DebugInfo/X86/objc-fwd-decl.ll"
+
%0 = type opaque
-@a = common global %0* null, align 8, !dbg !5
+@a = common global %0* null, align 8, !dbg !0
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!9, !10, !11, !12, !14}
+!llvm.dbg.cu = !{!5}
+!llvm.module.flags = !{!8, !9, !10, !11, !12, !13}
-!0 = distinct !DICompileUnit(language: DW_LANG_ObjC, producer: "clang version 3.1 (trunk 152054 trunk 152094)", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, file: !13, enums: !1, retainedTypes: !1, globals: !3, imports: !1)
-!1 = !{}
-!3 = !{!5}
-!5 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", line: 3, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7))
-!6 = !DIFile(filename: "foo.m", directory: "/Users/echristo")
-!7 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !8)
-!8 = !DICompositeType(tag: DW_TAG_structure_type, name: "FooBarBaz", line: 1, flags: DIFlagFwdDecl, runtimeLang: DW_LANG_ObjC, file: !13)
-!9 = !{i32 1, !"Objective-C Version", i32 2}
-!10 = !{i32 1, !"Objective-C Image Info Version", i32 0}
-!11 = !{i32 1, !"Objective-C Image Info Section", !"__DATA, __objc_imageinfo, regular, no_dead_strip"}
-!12 = !{i32 4, !"Objective-C Garbage Collection", i32 0}
-!13 = !DIFile(filename: "foo.m", directory: "/Users/echristo")
-!14 = !{i32 1, !"Debug Info Version", i32 3}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "a", scope: null, file: !2, line: 3, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "foo.m", directory: "/Users/echristo")
+!3 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64)
+!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "FooBarBaz", file: !2, line: 1, flags: DIFlagFwdDecl, runtimeLang: DW_LANG_ObjC)
+!5 = distinct !DICompileUnit(language: DW_LANG_ObjC, file: !2, producer: "clang version 3.1 (trunk 152054 trunk 152094)", isOptimized: false, runtimeVersion: 2, emissionKind: FullDebug, enums: !6, retainedTypes: !6, globals: !7, imports: !6)
+!6 = !{}
+!7 = !{!0}
+!8 = !{i32 1, !"Objective-C Version", i32 2}
+!9 = !{i32 1, !"Objective-C Image Info Version", i32 0}
+!10 = !{i32 1, !"Objective-C Image Info Section", !"__DATA, __objc_imageinfo, regular, no_dead_strip"}
+!11 = !{i32 4, !"Objective-C Garbage Collection", i32 0}
+!12 = !{i32 1, !"Debug Info Version", i32 3}
+!13 = !{i32 4, !"Objective-C Class Properties", i32 0}
+
diff --git a/llvm/test/DebugInfo/X86/pointer-type-size.ll b/llvm/test/DebugInfo/X86/pointer-type-size.ll
index d8a4d11..c798c6c 100644
--- a/llvm/test/DebugInfo/X86/pointer-type-size.ll
+++ b/llvm/test/DebugInfo/X86/pointer-type-size.ll
@@ -4,23 +4,26 @@
; CHECK: ptr
; CHECK-NOT: AT_bit_size
+source_filename = "test/DebugInfo/X86/pointer-type-size.ll"
+
%struct.crass = type { i8* }
-@crass = common global %struct.crass zeroinitializer, align 8, !dbg !5
+@crass = common global %struct.crass zeroinitializer, align 8, !dbg !0
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!14}
+!llvm.dbg.cu = !{!9}
+!llvm.module.flags = !{!12}
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 147882)", isOptimized: false, emissionKind: FullDebug, file: !13, enums: !1, retainedTypes: !1, globals: !3, imports: !1)
-!1 = !{}
-!3 = !{!5}
-!5 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "crass", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7))
-!6 = !DIFile(filename: "foo.c", directory: "/Users/echristo/tmp")
-!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "crass", line: 1, size: 64, align: 64, file: !13, elements: !8)
-!8 = !{!9}
-!9 = !DIDerivedType(tag: DW_TAG_member, name: "ptr", line: 1, size: 64, align: 64, file: !13, scope: !7, baseType: !10)
-!10 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !11)
-!11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !12)
-!12 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
-!13 = !DIFile(filename: "foo.c", directory: "/Users/echristo/tmp")
-!14 = !{i32 1, !"Debug Info Version", i32 3}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "crass", scope: null, file: !2, line: 1, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "foo.c", directory: "/Users/echristo/tmp")
+!3 = !DICompositeType(tag: DW_TAG_structure_type, name: "crass", file: !2, line: 1, size: 64, align: 64, elements: !4)
+!4 = !{!5}
+!5 = !DIDerivedType(tag: DW_TAG_member, name: "ptr", scope: !3, file: !2, line: 1, baseType: !6, size: 64, align: 64)
+!6 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !7)
+!7 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !8, size: 64, align: 64)
+!8 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
+!9 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 3.1 (trunk 147882)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !10, retainedTypes: !10, globals: !11, imports: !10)
+!10 = !{}
+!11 = !{!0}
+!12 = !{i32 1, !"Debug Info Version", i32 3}
+
diff --git a/llvm/test/DebugInfo/X86/ref_addr_relocation.ll b/llvm/test/DebugInfo/X86/ref_addr_relocation.ll
index cb9a9f8..e049588 100644
--- a/llvm/test/DebugInfo/X86/ref_addr_relocation.ll
+++ b/llvm/test/DebugInfo/X86/ref_addr_relocation.ll
@@ -50,27 +50,30 @@
; DARWIN-DWARF: DW_TAG_variable
; DARWIN-DWARF: DW_AT_type [DW_FORM_ref_addr] {{.*}}[[ADDR]])
+source_filename = "test/DebugInfo/X86/ref_addr_relocation.ll"
+
%struct.foo = type { i8 }
-@f = global %struct.foo zeroinitializer, align 1, !dbg !7
-@g = global %struct.foo zeroinitializer, align 1, !dbg !12
+@f = global %struct.foo zeroinitializer, align 1, !dbg !0
+@g = global %struct.foo zeroinitializer, align 1, !dbg !6
-!llvm.dbg.cu = !{!0, !9}
+!llvm.dbg.cu = !{!9, !12}
!llvm.module.flags = !{!14, !15}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (trunk 191799)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !6, imports: !2)
-!1 = !DIFile(filename: "tu1.cpp", directory: "/Users/manmanren/test-Nov/type_unique_air/ref_addr")
-!2 = !{}
-!3 = !{!4}
-!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", line: 1, size: 8, align: 8, file: !5, elements: !2, identifier: "_ZTS3foo")
-!5 = !DIFile(filename: "./hdr.h", directory: "/Users/manmanren/test-Nov/type_unique_air/ref_addr")
-!6 = !{!7}
-!7 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "f", line: 2, isLocal: false, isDefinition: true, scope: null, file: !8, type: !4))
-!8 = !DIFile(filename: "tu1.cpp", directory: "/Users/manmanren/test-Nov/type_unique_air/ref_addr")
-!9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 (trunk 191799)", isOptimized: false, emissionKind: FullDebug, file: !10, enums: !2, retainedTypes: !3, globals: !11, imports: !2)
-!10 = !DIFile(filename: "tu2.cpp", directory: "/Users/manmanren/test-Nov/type_unique_air/ref_addr")
-!11 = !{!12}
-!12 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "g", line: 2, isLocal: false, isDefinition: true, scope: null, file: !13, type: !4))
-!13 = !DIFile(filename: "tu2.cpp", directory: "/Users/manmanren/test-Nov/type_unique_air/ref_addr")
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "f", scope: null, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "tu1.cpp", directory: "/Users/manmanren/test-Nov/type_unique_air/ref_addr")
+!3 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", file: !4, line: 1, size: 8, align: 8, elements: !5, identifier: "_ZTS3foo")
+!4 = !DIFile(filename: "./hdr.h", directory: "/Users/manmanren/test-Nov/type_unique_air/ref_addr")
+!5 = !{}
+!6 = !DIGlobalVariableExpression(var: !7)
+!7 = !DIGlobalVariable(name: "g", scope: null, file: !8, line: 2, type: !3, isLocal: false, isDefinition: true)
+!8 = !DIFile(filename: "tu2.cpp", directory: "/Users/manmanren/test-Nov/type_unique_air/ref_addr")
+!9 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.4 (trunk 191799)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !10, globals: !11, imports: !5)
+!10 = !{!3}
+!11 = !{!0}
+!12 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !8, producer: "clang version 3.4 (trunk 191799)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !10, globals: !13, imports: !5)
+!13 = !{!6}
!14 = !{i32 2, !"Dwarf Version", i32 2}
!15 = !{i32 1, !"Debug Info Version", i32 3}
+
diff --git a/llvm/test/DebugInfo/X86/static_member_array.ll b/llvm/test/DebugInfo/X86/static_member_array.ll
index e3afb8e..0e63097 100644
--- a/llvm/test/DebugInfo/X86/static_member_array.ll
+++ b/llvm/test/DebugInfo/X86/static_member_array.ll
@@ -42,30 +42,33 @@
target triple = "x86_64-apple-macosx10.12.0"
@_ZN1A15fully_specifiedE = global i32 0, align 4, !dbg !0
-@_ZN1A4smemE = global [4 x i32] [i32 0, i32 1, i32 2, i32 3], align 16, !dbg !5
+@_ZN1A4smemE = global [4 x i32] [i32 0, i32 1, i32 2, i32 3], align 16, !dbg !6
-!llvm.dbg.cu = !{!1}
-!llvm.module.flags = !{!17, !18, !19}
-!llvm.ident = !{!20}
+!llvm.dbg.cu = !{!2}
+!llvm.module.flags = !{!19, !20, !21}
+!llvm.ident = !{!22}
-!0 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "fully_specified", linkageName: "_ZN1A15fully_specifiedE", scope: !1, file: !2, line: 7, type: !7, isLocal: false, isDefinition: true, declaration: !13))
-!1 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 4.0.0 (trunk 286129) (llvm/trunk 286128)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !3, globals: !4)
-!2 = !DIFile(filename: "static_member_array.cpp", directory: "/Volumes/Data/radar/28706946")
-!3 = !{}
-!4 = !{!0, !5}
-!5 = distinct !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "smem", linkageName: "_ZN1A4smemE", scope: !1, file: !2, line: 8, type: !6, isLocal: false, isDefinition: true, declaration: !10))
-!6 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, size: 128, elements: !8)
-!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-!8 = !{!9}
-!9 = !DISubrange(count: 4)
-!10 = !DIDerivedType(tag: DW_TAG_member, name: "smem", scope: !11, file: !2, line: 4, baseType: !14, flags: DIFlagStaticMember)
-!11 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !2, line: 1, size: 8, elements: !12, identifier: "_ZTS1A")
-!12 = !{!13, !10}
-!13 = !DIDerivedType(tag: DW_TAG_member, name: "fully_specified", scope: !11, file: !2, line: 3, baseType: !7, flags: DIFlagStaticMember)
-!14 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, elements: !15)
-!15 = !{!16}
-!16 = !DISubrange(count: -1)
-!17 = !{i32 2, !"Dwarf Version", i32 4}
-!18 = !{i32 2, !"Debug Info Version", i32 3}
-!19 = !{i32 1, !"PIC Level", i32 2}
-!20 = !{!"clang version 4.0.0 (trunk 286129) (llvm/trunk 286128)"}
+!0 = distinct !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "fully_specified", linkageName: "_ZN1A15fully_specifiedE", scope: !2, file: !3, line: 7, type: !9, isLocal: false, isDefinition: true, declaration: !15)
+!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 4.0.0 (trunk 286129) (llvm/trunk 286128)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)
+!3 = !DIFile(filename: "static_member_array.cpp", directory: "/Volumes/Data/radar/28706946")
+!4 = !{}
+!5 = !{!0, !6}
+!6 = distinct !DIGlobalVariableExpression(var: !7)
+!7 = !DIGlobalVariable(name: "smem", linkageName: "_ZN1A4smemE", scope: !2, file: !3, line: 8, type: !8, isLocal: false, isDefinition: true, declaration: !12)
+!8 = !DICompositeType(tag: DW_TAG_array_type, baseType: !9, size: 128, elements: !10)
+!9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+!10 = !{!11}
+!11 = !DISubrange(count: 4)
+!12 = !DIDerivedType(tag: DW_TAG_member, name: "smem", scope: !13, file: !3, line: 4, baseType: !16, flags: DIFlagStaticMember)
+!13 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !3, line: 1, size: 8, elements: !14, identifier: "_ZTS1A")
+!14 = !{!15, !12}
+!15 = !DIDerivedType(tag: DW_TAG_member, name: "fully_specified", scope: !13, file: !3, line: 3, baseType: !9, flags: DIFlagStaticMember)
+!16 = !DICompositeType(tag: DW_TAG_array_type, baseType: !9, elements: !17)
+!17 = !{!18}
+!18 = !DISubrange(count: -1)
+!19 = !{i32 2, !"Dwarf Version", i32 4}
+!20 = !{i32 2, !"Debug Info Version", i32 3}
+!21 = !{i32 1, !"PIC Level", i32 2}
+!22 = !{!"clang version 4.0.0 (trunk 286129) (llvm/trunk 286128)"}
+
diff --git a/llvm/test/DebugInfo/X86/stringpool.ll b/llvm/test/DebugInfo/X86/stringpool.ll
index 43636d1..e447427 100644
--- a/llvm/test/DebugInfo/X86/stringpool.ll
+++ b/llvm/test/DebugInfo/X86/stringpool.ll
@@ -1,19 +1,19 @@
; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s --check-prefix=LINUX
; RUN: llc -mtriple=x86_64-darwin < %s | FileCheck %s --check-prefix=DARWIN
-@yyyy = common global i32 0, align 4, !dbg !5
+source_filename = "test/DebugInfo/X86/stringpool.ll"
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!9}
+@yyyy = common global i32 0, align 4, !dbg !0
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 143009)", isOptimized: true, emissionKind: FullDebug, file: !8, enums: !1, retainedTypes: !1, globals: !3, imports: !1)
-!1 = !{}
-!3 = !{!5}
-!5 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "yyyy", line: 1, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7))
-!6 = !DIFile(filename: "z.c", directory: "/home/nicholas")
-!7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!8 = !DIFile(filename: "z.c", directory: "/home/nicholas")
+!llvm.dbg.cu = !{!4}
+!llvm.module.flags = !{!7}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "yyyy", scope: null, file: !2, line: 1, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "z.c", directory: "/home/nicholas")
+!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!4 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 3.1 (trunk 143009)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, retainedTypes: !5, globals: !6, imports: !5)
+!5 = !{}
; Verify that "yyyy" ended up in the stringpool.
; LINUX: .section .debug_str,"MS",@progbits,1
; LINUX: yyyy
@@ -39,4 +39,5 @@
; DARWIN-NEXT: .byte 9 ## DW_AT_location
; DARWIN-NEXT: .byte 3
; DARWIN-NEXT: .quad _yyyy
-!9 = !{i32 1, !"Debug Info Version", i32 3}
+!6 = !{!0}
+!7 = !{i32 1, !"Debug Info Version", i32 3}
diff --git a/llvm/test/DebugInfo/X86/struct-loc.ll b/llvm/test/DebugInfo/X86/struct-loc.ll
index 641d70c..f6b3226 100644
--- a/llvm/test/DebugInfo/X86/struct-loc.ll
+++ b/llvm/test/DebugInfo/X86/struct-loc.ll
@@ -7,21 +7,24 @@
; CHECK: DW_AT_decl_line
; CHECK: DW_TAG_member
+source_filename = "test/DebugInfo/X86/struct-loc.ll"
+
%struct.foo = type { i32 }
-@f = common global %struct.foo zeroinitializer, align 4, !dbg !5
+@f = common global %struct.foo zeroinitializer, align 4, !dbg !0
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!12}
+!llvm.dbg.cu = !{!7}
+!llvm.module.flags = !{!10}
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.1 (trunk 152837) (llvm/trunk 152845)", isOptimized: false, emissionKind: FullDebug, file: !11, enums: !1, retainedTypes: !1, globals: !3, imports: !1)
-!1 = !{}
-!3 = !{!5}
-!5 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "f", line: 5, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7))
-!6 = !DIFile(filename: "struct_bug.c", directory: "/Users/echristo/tmp")
-!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", line: 1, size: 32, align: 32, file: !11, elements: !8)
-!8 = !{!9}
-!9 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !11, scope: !7, baseType: !10)
-!10 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!11 = !DIFile(filename: "struct_bug.c", directory: "/Users/echristo/tmp")
-!12 = !{i32 1, !"Debug Info Version", i32 3}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "f", scope: null, file: !2, line: 5, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "struct_bug.c", directory: "/Users/echristo/tmp")
+!3 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", file: !2, line: 1, size: 32, align: 32, elements: !4)
+!4 = !{!5}
+!5 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !3, file: !2, line: 2, baseType: !6, size: 32, align: 32)
+!6 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!7 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 3.1 (trunk 152837) (llvm/trunk 152845)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !8, retainedTypes: !8, globals: !9, imports: !8)
+!8 = !{}
+!9 = !{!0}
+!10 = !{i32 1, !"Debug Info Version", i32 3}
+
diff --git a/llvm/test/DebugInfo/X86/template.ll b/llvm/test/DebugInfo/X86/template.ll
index bc5eea9..dc2309d 100644
--- a/llvm/test/DebugInfo/X86/template.ll
+++ b/llvm/test/DebugInfo/X86/template.ll
@@ -58,72 +58,76 @@
; CHECK: [[NULLPTR]]:{{ *}}DW_TAG_unspecified_type
; CHECK-NEXT: DW_AT_name{{.*}}= "decltype(nullptr)"
+source_filename = "test/DebugInfo/X86/template.ll"
+
%"struct.y_impl<int>::nested" = type { i8 }
-@glbl = global i32 0, align 4, !dbg !31
-@n = global %"struct.y_impl<int>::nested" zeroinitializer, align 1, !dbg !32
+@glbl = global i32 0, align 4, !dbg !0
+@n = global %"struct.y_impl<int>::nested" zeroinitializer, align 1, !dbg !4
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_template.cpp, i8* null }]
-define internal void @__cxx_global_var_init() section ".text.startup" !dbg !10 {
+define internal void @__cxx_global_var_init() section ".text.startup" !dbg !17 {
entry:
- %call = call i32 @_Z4funcILi3EXadL_Z4glblEE6y_implLDn0EJLi1ELi2EEEiv(), !dbg !36
- store i32 %call, i32* @glbl, align 4, !dbg !36
- ret void, !dbg !36
+ %call = call i32 @_Z4funcILi3EXadL_Z4glblEE6y_implLDn0EJLi1ELi2EEEiv(), !dbg !20
+ store i32 %call, i32* @glbl, align 4, !dbg !20
+ ret void, !dbg !20
}
; Function Attrs: nounwind uwtable
-define linkonce_odr i32 @_Z4funcILi3EXadL_Z4glblEE6y_implLDn0EJLi1ELi2EEEiv() #0 !dbg !14 {
+define linkonce_odr i32 @_Z4funcILi3EXadL_Z4glblEE6y_implLDn0EJLi1ELi2EEEiv() #0 !dbg !21 {
entry:
- ret i32 3, !dbg !37
+ ret i32 3, !dbg !35
}
define internal void @_GLOBAL__sub_I_template.cpp() section ".text.startup" {
entry:
- call void @__cxx_global_var_init(), !dbg !38
+ call void @__cxx_global_var_init(), !dbg !36
ret void
}
attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!33, !34}
-!llvm.ident = !{!35}
+!llvm.dbg.cu = !{!11}
+!llvm.module.flags = !{!14, !15}
+!llvm.ident = !{!16}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.6.0 (trunk 224394) (llvm/trunk 224384)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !30, imports: !2)
-!1 = !DIFile(filename: "template.cpp", directory: "/tmp/dbginfo")
-!2 = !{}
-!3 = !{!4, !8}
-!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "y_impl<int>", line: 2, size: 8, align: 8, file: !1, elements: !2, templateParams: !5, identifier: "_ZTS6y_implIiE")
-!5 = !{!6}
-!6 = !DITemplateTypeParameter(type: !7)
-!7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!8 = !DICompositeType(tag: DW_TAG_structure_type, name: "nested", line: 2, size: 8, align: 8, file: !1, scope: !4, elements: !2, identifier: "_ZTSN6y_implIiE6nestedE")
-!10 = distinct !DISubprogram(name: "__cxx_global_var_init", line: 3, isLocal: true, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !11, type: !12, variables: !2)
-!11 = !DIFile(filename: "template.cpp", directory: "/tmp/dbginfo")
-!12 = !DISubroutineType(types: !13)
-!13 = !{null}
-!14 = distinct !DISubprogram(name: "func<3, &glbl, y_impl, nullptr, 1, 2>", linkageName: "_Z4funcILi3EXadL_Z4glblEE6y_implLDn0EJLi1ELi2EEEiv", line: 1, isLocal: false, isDefinition: true, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 1, file: !1, scope: !11, type: !15, templateParams: !17, variables: !2)
-!15 = !DISubroutineType(types: !16)
-!16 = !{!7}
-!17 = !{!18, !19, !21, !22, !24}
-!18 = !DITemplateValueParameter(tag: DW_TAG_template_value_parameter, name: "x", type: !7, value: i32 3)
-!19 = !DITemplateValueParameter(tag: DW_TAG_template_value_parameter, type: !20, value: i32* @glbl)
-!20 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !7)
-!21 = !DITemplateValueParameter(tag: DW_TAG_GNU_template_template_param, name: "y", type: null, value: !"y_impl")
-!22 = !DITemplateValueParameter(tag: DW_TAG_template_value_parameter, name: "n", type: !23, value: i8 0)
-!23 = !DIBasicType(tag: DW_TAG_unspecified_type, name: "decltype(nullptr)")
-!24 = !DITemplateValueParameter(tag: DW_TAG_GNU_template_parameter_pack, name: "z", type: null, value: !25)
-!25 = !{!26, !27}
-!26 = !DITemplateValueParameter(tag: DW_TAG_template_value_parameter, type: !7, value: i32 1)
-!27 = !DITemplateValueParameter(tag: DW_TAG_template_value_parameter, type: !7, value: i32 2)
-!28 = distinct !DISubprogram(name: "", linkageName: "_GLOBAL__sub_I_template.cpp", isLocal: true, isDefinition: true, flags: DIFlagArtificial, isOptimized: false, unit: !0, file: !1, scope: !11, type: !29, variables: !2)
-!29 = !DISubroutineType(types: !2)
-!30 = !{!31, !32}
-!31 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "glbl", line: 3, isLocal: false, isDefinition: true, scope: null, file: !11, type: !7))
-!32 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "n", line: 4, isLocal: false, isDefinition: true, scope: null, file: !11, type: !8))
-!33 = !{i32 2, !"Dwarf Version", i32 4}
-!34 = !{i32 2, !"Debug Info Version", i32 3}
-!35 = !{!"clang version 3.6.0 (trunk 224394) (llvm/trunk 224384)"}
-!36 = !DILocation(line: 3, column: 12, scope: !10)
-!37 = !DILocation(line: 1, column: 96, scope: !14)
-!38 = !DILocation(line: 0, scope: !28)
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "glbl", scope: null, file: !2, line: 3, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "template.cpp", directory: "/tmp/dbginfo")
+!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!4 = !DIGlobalVariableExpression(var: !5)
+!5 = !DIGlobalVariable(name: "n", scope: null, file: !2, line: 4, type: !6, isLocal: false, isDefinition: true)
+!6 = !DICompositeType(tag: DW_TAG_structure_type, name: "nested", scope: !7, file: !2, line: 2, size: 8, align: 8, elements: !8, identifier: "_ZTSN6y_implIiE6nestedE")
+!7 = !DICompositeType(tag: DW_TAG_structure_type, name: "y_impl<int>", file: !2, line: 2, size: 8, align: 8, elements: !8, templateParams: !9, identifier: "_ZTS6y_implIiE")
+!8 = !{}
+!9 = !{!10}
+!10 = !DITemplateTypeParameter(type: !3)
+!11 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.6.0 (trunk 224394) (llvm/trunk 224384)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !8, retainedTypes: !12, globals: !13, imports: !8)
+!12 = !{!7, !6}
+!13 = !{!0, !4}
+!14 = !{i32 2, !"Dwarf Version", i32 4}
+!15 = !{i32 2, !"Debug Info Version", i32 3}
+!16 = !{!"clang version 3.6.0 (trunk 224394) (llvm/trunk 224384)"}
+!17 = distinct !DISubprogram(name: "__cxx_global_var_init", scope: !2, file: !2, line: 3, type: !18, isLocal: true, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !11, variables: !8)
+!18 = !DISubroutineType(types: !19)
+!19 = !{null}
+!20 = !DILocation(line: 3, column: 12, scope: !17)
+!21 = distinct !DISubprogram(name: "func<3, &glbl, y_impl, nullptr, 1, 2>", linkageName: "_Z4funcILi3EXadL_Z4glblEE6y_implLDn0EJLi1ELi2EEEiv", scope: !2, file: !2, line: 1, type: !22, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !11, templateParams: !24, variables: !8)
+!22 = !DISubroutineType(types: !23)
+!23 = !{!3}
+!24 = !{!25, !26, !28, !29, !31}
+!25 = !DITemplateValueParameter(name: "x", type: !3, value: i32 3)
+!26 = !DITemplateValueParameter(type: !27, value: i32* @glbl)
+!27 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !3, size: 64, align: 64)
+!28 = !DITemplateValueParameter(tag: DW_TAG_GNU_template_template_param, name: "y", value: !"y_impl")
+!29 = !DITemplateValueParameter(name: "n", type: !30, value: i8 0)
+!30 = !DIBasicType(tag: DW_TAG_unspecified_type, name: "decltype(nullptr)")
+!31 = !DITemplateValueParameter(tag: DW_TAG_GNU_template_parameter_pack, name: "z", value: !32)
+!32 = !{!33, !34}
+!33 = !DITemplateValueParameter(type: !3, value: i32 1)
+!34 = !DITemplateValueParameter(type: !3, value: i32 2)
+!35 = !DILocation(line: 1, column: 96, scope: !21)
+!36 = !DILocation(line: 0, scope: !37)
+!37 = distinct !DISubprogram(linkageName: "_GLOBAL__sub_I_template.cpp", scope: !2, file: !2, type: !38, isLocal: true, isDefinition: true, flags: DIFlagArtificial, isOptimized: false, unit: !11, variables: !8)
+!38 = !DISubroutineType(types: !8)
+
diff --git a/llvm/test/DebugInfo/X86/tls.ll b/llvm/test/DebugInfo/X86/tls.ll
index a251c63..19570d0 100644
--- a/llvm/test/DebugInfo/X86/tls.ll
+++ b/llvm/test/DebugInfo/X86/tls.ll
@@ -95,37 +95,40 @@
;
; template int func<&glbl>(); // create a second reference to 'glbl'
+source_filename = "test/DebugInfo/X86/tls.ll"
-@tls = thread_local global i32 0, align 4, !dbg !13
-@glbl = global i32 0, align 4, !dbg !14
+@tls = thread_local global i32 0, align 4, !dbg !0
+@glbl = global i32 0, align 4, !dbg !4
; Function Attrs: nounwind uwtable
-define weak_odr i32 @_Z4funcIXadL_Z4glblEEEiv() #0 !dbg !4 {
+define weak_odr i32 @_Z4funcIXadL_Z4glblEEEiv() #0 !dbg !12 {
entry:
ret i32 0, !dbg !18
}
attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!15, !16}
-!llvm.ident = !{!17}
+!llvm.dbg.cu = !{!6}
+!llvm.module.flags = !{!9, !10}
+!llvm.ident = !{!11}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5 ", isOptimized: false, splitDebugFilename: "-.dwo", emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !12, imports: !2)
-!1 = !DIFile(filename: "tls.cpp", directory: "/tmp/dbginfo")
-!2 = !{}
-!4 = distinct !DISubprogram(name: "func<&glbl>", linkageName: "_Z4funcIXadL_Z4glblEEEiv", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 5, file: !1, scope: !5, type: !6, templateParams: !9, variables: !2)
-!5 = !DIFile(filename: "tls.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 = !{!10}
-!10 = !DITemplateValueParameter(tag: DW_TAG_template_value_parameter, name: "I", type: !11, value: i32* @glbl)
-!11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !8)
-!12 = !{!13, !14}
-!13 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "tls", line: 1, isLocal: false, isDefinition: true, scope: null, file: !5, type: !8))
-!14 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "glbl", line: 2, isLocal: false, isDefinition: true, scope: null, file: !5, type: !8))
-!15 = !{i32 2, !"Dwarf Version", i32 4}
-!16 = !{i32 1, !"Debug Info Version", i32 3}
-!17 = !{!"clang version 3.5 "}
-!18 = !DILocation(line: 6, scope: !4)
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "tls", scope: null, file: !2, line: 1, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "tls.cpp", directory: "/tmp/dbginfo")
+!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!4 = !DIGlobalVariableExpression(var: !5)
+!5 = !DIGlobalVariable(name: "glbl", scope: null, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true)
+!6 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.5 ", isOptimized: false, runtimeVersion: 0, splitDebugFilename: "-.dwo", emissionKind: FullDebug, enums: !7, retainedTypes: !7, globals: !8, imports: !7)
+!7 = !{}
+!8 = !{!0, !4}
+!9 = !{i32 2, !"Dwarf Version", i32 4}
+!10 = !{i32 1, !"Debug Info Version", i32 3}
+!11 = !{!"clang version 3.5 "}
+!12 = distinct !DISubprogram(name: "func<&glbl>", linkageName: "_Z4funcIXadL_Z4glblEEEiv", scope: !2, file: !2, line: 5, type: !13, isLocal: false, isDefinition: true, scopeLine: 5, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !6, templateParams: !15, variables: !7)
+!13 = !DISubroutineType(types: !14)
+!14 = !{!3}
+!15 = !{!16}
+!16 = !DITemplateValueParameter(name: "I", type: !17, value: i32* @glbl)
+!17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !3, size: 64, align: 64)
+!18 = !DILocation(line: 6, scope: !12)
+
diff --git a/llvm/test/DebugInfo/X86/type_units_with_addresses.ll b/llvm/test/DebugInfo/X86/type_units_with_addresses.ll
index 5a1e16a..4816ce3 100644
--- a/llvm/test/DebugInfo/X86/type_units_with_addresses.ll
+++ b/llvm/test/DebugInfo/X86/type_units_with_addresses.ll
@@ -47,7 +47,6 @@
;
;S4 s4;
-
; CHECK: .debug_info.dwo contents:
; CHECK: DW_TAG_structure_type
@@ -92,6 +91,8 @@
; SINGLE-NEXT: DW_AT_declaration
; SINGLE-NEXT: DW_AT_signature
+source_filename = "test/DebugInfo/X86/type_units_with_addresses.ll"
+
%struct.S1 = type { i8 }
%struct.S2 = type { %struct.S2_1 }
%struct.S2_1 = type { i8 }
@@ -102,50 +103,55 @@
%struct.S4_1 = type { i8 }
%struct.S4_2 = type { i8 }
-@i = global i32 0, align 4, !dbg !28
-@a = global %struct.S1 zeroinitializer, align 1, !dbg !30
-@s2 = global %struct.S2 zeroinitializer, align 1, !dbg !31
-@s3 = global %struct.S3 zeroinitializer, align 1, !dbg !32
-@s4 = global %struct.S4 zeroinitializer, align 1, !dbg !33
+@i = global i32 0, align 4, !dbg !0
+@a = global %struct.S1 zeroinitializer, align 1, !dbg !4
+@s2 = global %struct.S2 zeroinitializer, align 1, !dbg !11
+@s3 = global %struct.S3 zeroinitializer, align 1, !dbg !17
+@s4 = global %struct.S4 zeroinitializer, align 1, !dbg !25
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!34, !35}
-!llvm.ident = !{!36}
+!llvm.dbg.cu = !{!35}
+!llvm.module.flags = !{!38, !39}
+!llvm.ident = !{!40}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0 ", isOptimized: false, splitDebugFilename: "tu.dwo", emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !3, globals: !27, imports: !2)
-!1 = !DIFile(filename: "tu.cpp", directory: "/tmp/dbginfo")
-!2 = !{}
-!3 = !{!4, !9, !12, !13, !17, !18, !19, !23, !24}
-!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "S1<&i>", line: 4, size: 8, align: 8, file: !1, elements: !2, templateParams: !5, identifier: "_ZTS2S1IXadL_Z1iEEE")
-!5 = !{!6}
-!6 = !DITemplateValueParameter(tag: DW_TAG_template_value_parameter, name: "I", type: !7, value: i32* @i)
-!7 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !8)
-!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!9 = !DICompositeType(tag: DW_TAG_structure_type, name: "S2", line: 11, size: 8, align: 8, file: !1, elements: !10, identifier: "_ZTS2S2")
-!10 = !{!11}
-!11 = !DIDerivedType(tag: DW_TAG_member, name: "s2_1", line: 12, size: 8, align: 8, file: !1, scope: !9, baseType: !12)
-!12 = !DICompositeType(tag: DW_TAG_structure_type, name: "S2_1<&i>", line: 9, size: 8, align: 8, file: !1, elements: !2, templateParams: !5, identifier: "_ZTS4S2_1IXadL_Z1iEEE")
-!13 = !DICompositeType(tag: DW_TAG_structure_type, name: "S3", line: 22, size: 16, align: 8, file: !1, elements: !14, identifier: "_ZTS2S3")
-!14 = !{!15, !16}
-!15 = !DIDerivedType(tag: DW_TAG_member, name: "s3_1", line: 23, size: 8, align: 8, file: !1, scope: !13, baseType: !17)
-!16 = !DIDerivedType(tag: DW_TAG_member, name: "s3_2", line: 24, size: 8, align: 8, offset: 8, file: !1, scope: !13, baseType: !18)
-!17 = !DICompositeType(tag: DW_TAG_structure_type, name: "S3_1<&i>", line: 18, size: 8, align: 8, file: !1, elements: !2, templateParams: !5, identifier: "_ZTS4S3_1IXadL_Z1iEEE")
-!18 = !DICompositeType(tag: DW_TAG_structure_type, name: "S3_2", line: 20, size: 8, align: 8, file: !1, elements: !2, identifier: "_ZTS4S3_2")
-!19 = !DICompositeType(tag: DW_TAG_structure_type, name: "S4", line: 34, size: 16, align: 8, file: !1, elements: !20, identifier: "_ZTS2S4")
-!20 = !{!21, !22}
-!21 = !DIDerivedType(tag: DW_TAG_member, name: "s4_1", line: 35, size: 8, align: 8, file: !1, scope: !19, baseType: !23)
-!22 = !DIDerivedType(tag: DW_TAG_member, name: "s4_2", line: 36, size: 8, align: 8, offset: 8, file: !1, scope: !19, baseType: !24)
-!23 = !DICompositeType(tag: DW_TAG_structure_type, name: "S4_1", line: 29, size: 8, align: 8, file: !1, elements: !2, identifier: "_ZTS4S4_1")
-!24 = !DICompositeType(tag: DW_TAG_structure_type, name: "S4_2<&i>", line: 32, size: 8, align: 8, file: !1, elements: !2, templateParams: !25, identifier: "_ZTS4S4_2IXadL_Z1iEEE")
-!25 = !{!26}
-!26 = !DITemplateValueParameter(tag: DW_TAG_template_value_parameter, name: "T", type: !7, value: i32* @i)
-!27 = !{!28, !30, !31, !32, !33}
-!28 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "i", line: 1, isLocal: false, isDefinition: true, scope: null, file: !29, type: !8))
-!29 = !DIFile(filename: "tu.cpp", directory: "/tmp/dbginfo")
-!30 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", line: 6, isLocal: false, isDefinition: true, scope: null, file: !29, type: !4))
-!31 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "s2", line: 15, isLocal: false, isDefinition: true, scope: null, file: !29, type: !9))
-!32 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "s3", line: 27, isLocal: false, isDefinition: true, scope: null, file: !29, type: !13))
-!33 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "s4", line: 39, isLocal: false, isDefinition: true, scope: null, file: !29, type: !19))
-!34 = !{i32 2, !"Dwarf Version", i32 4}
-!35 = !{i32 1, !"Debug Info Version", i32 3}
-!36 = !{!"clang version 3.5.0 "}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "i", scope: null, file: !2, line: 1, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "tu.cpp", directory: "/tmp/dbginfo")
+!3 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!4 = !DIGlobalVariableExpression(var: !5)
+!5 = !DIGlobalVariable(name: "a", scope: null, file: !2, line: 6, type: !6, isLocal: false, isDefinition: true)
+!6 = !DICompositeType(tag: DW_TAG_structure_type, name: "S1<&i>", file: !2, line: 4, size: 8, align: 8, elements: !7, templateParams: !8, identifier: "_ZTS2S1IXadL_Z1iEEE")
+!7 = !{}
+!8 = !{!9}
+!9 = !DITemplateValueParameter(name: "I", type: !10, value: i32* @i)
+!10 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !3, size: 64, align: 64)
+!11 = !DIGlobalVariableExpression(var: !12)
+!12 = !DIGlobalVariable(name: "s2", scope: null, file: !2, line: 15, type: !13, isLocal: false, isDefinition: true)
+!13 = !DICompositeType(tag: DW_TAG_structure_type, name: "S2", file: !2, line: 11, size: 8, align: 8, elements: !14, identifier: "_ZTS2S2")
+!14 = !{!15}
+!15 = !DIDerivedType(tag: DW_TAG_member, name: "s2_1", scope: !13, file: !2, line: 12, baseType: !16, size: 8, align: 8)
+!16 = !DICompositeType(tag: DW_TAG_structure_type, name: "S2_1<&i>", file: !2, line: 9, size: 8, align: 8, elements: !7, templateParams: !8, identifier: "_ZTS4S2_1IXadL_Z1iEEE")
+!17 = !DIGlobalVariableExpression(var: !18)
+!18 = !DIGlobalVariable(name: "s3", scope: null, file: !2, line: 27, type: !19, isLocal: false, isDefinition: true)
+!19 = !DICompositeType(tag: DW_TAG_structure_type, name: "S3", file: !2, line: 22, size: 16, align: 8, elements: !20, identifier: "_ZTS2S3")
+!20 = !{!21, !23}
+!21 = !DIDerivedType(tag: DW_TAG_member, name: "s3_1", scope: !19, file: !2, line: 23, baseType: !22, size: 8, align: 8)
+!22 = !DICompositeType(tag: DW_TAG_structure_type, name: "S3_1<&i>", file: !2, line: 18, size: 8, align: 8, elements: !7, templateParams: !8, identifier: "_ZTS4S3_1IXadL_Z1iEEE")
+!23 = !DIDerivedType(tag: DW_TAG_member, name: "s3_2", scope: !19, file: !2, line: 24, baseType: !24, size: 8, align: 8, offset: 8)
+!24 = !DICompositeType(tag: DW_TAG_structure_type, name: "S3_2", file: !2, line: 20, size: 8, align: 8, elements: !7, identifier: "_ZTS4S3_2")
+!25 = !DIGlobalVariableExpression(var: !26)
+!26 = !DIGlobalVariable(name: "s4", scope: null, file: !2, line: 39, type: !27, isLocal: false, isDefinition: true)
+!27 = !DICompositeType(tag: DW_TAG_structure_type, name: "S4", file: !2, line: 34, size: 16, align: 8, elements: !28, identifier: "_ZTS2S4")
+!28 = !{!29, !31}
+!29 = !DIDerivedType(tag: DW_TAG_member, name: "s4_1", scope: !27, file: !2, line: 35, baseType: !30, size: 8, align: 8)
+!30 = !DICompositeType(tag: DW_TAG_structure_type, name: "S4_1", file: !2, line: 29, size: 8, align: 8, elements: !7, identifier: "_ZTS4S4_1")
+!31 = !DIDerivedType(tag: DW_TAG_member, name: "s4_2", scope: !27, file: !2, line: 36, baseType: !32, size: 8, align: 8, offset: 8)
+!32 = !DICompositeType(tag: DW_TAG_structure_type, name: "S4_2<&i>", file: !2, line: 32, size: 8, align: 8, elements: !7, templateParams: !33, identifier: "_ZTS4S4_2IXadL_Z1iEEE")
+!33 = !{!34}
+!34 = !DITemplateValueParameter(name: "T", type: !10, value: i32* @i)
+!35 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang version 3.5.0 ", isOptimized: false, runtimeVersion: 0, splitDebugFilename: "tu.dwo", emissionKind: FullDebug, enums: !7, retainedTypes: !36, globals: !37, imports: !7)
+!36 = !{!6, !13, !16, !19, !22, !24, !27, !30, !32}
+!37 = !{!0, !4, !11, !17, !25}
+!38 = !{i32 2, !"Dwarf Version", i32 4}
+!39 = !{i32 1, !"Debug Info Version", i32 3}
+!40 = !{!"clang version 3.5.0 "}
+
diff --git a/llvm/test/DebugInfo/X86/union-template.ll b/llvm/test/DebugInfo/X86/union-template.ll
index 6b9398b..3b08415 100644
--- a/llvm/test/DebugInfo/X86/union-template.ll
+++ b/llvm/test/DebugInfo/X86/union-template.ll
@@ -7,52 +7,58 @@
; CHECK: DW_TAG_template_type_parameter
; CHECK: "T"
+source_filename = "test/DebugInfo/X86/union-template.ll"
+
%"union.PR15637::Value" = type { i32 }
-@_ZN7PR156371fE = global %"union.PR15637::Value" zeroinitializer, align 4, !dbg !10
+@_ZN7PR156371fE = global %"union.PR15637::Value" zeroinitializer, align 4, !dbg !0
-define void @_ZN7PR156371gEf(float %value) #0 !dbg !4 {
+; Function Attrs: nounwind
+define void @_ZN7PR156371gEf(float %value) #0 !dbg !19 {
entry:
%value.addr = alloca float, align 4
%tempValue = alloca %"union.PR15637::Value", align 4
store float %value, float* %value.addr, align 4
- call void @llvm.dbg.declare(metadata float* %value.addr, metadata !23, metadata !DIExpression()), !dbg !24
- call void @llvm.dbg.declare(metadata %"union.PR15637::Value"* %tempValue, metadata !25, metadata !DIExpression()), !dbg !26
+ call void @llvm.dbg.declare(metadata float* %value.addr, metadata !22, metadata !23), !dbg !24
+ call void @llvm.dbg.declare(metadata %"union.PR15637::Value"* %tempValue, metadata !25, metadata !23), !dbg !26
ret void, !dbg !27
}
+; Function Attrs: nounwind readnone
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
attributes #0 = { nounwind }
attributes #1 = { nounwind readnone }
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!28}
+!llvm.dbg.cu = !{!15}
+!llvm.module.flags = !{!18}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.3 (trunk 178499) (llvm/trunk 178472)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !9, imports: !2)
-!1 = !DIFile(filename: "foo.cc", directory: "/usr/local/google/home/echristo/tmp")
-!2 = !{}
-!4 = distinct !DISubprogram(name: "g", linkageName: "_ZN7PR156371gEf", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, variables: !2)
-!5 = !DINamespace(name: "PR15637", line: 1, file: !1, scope: null)
-!6 = !DISubroutineType(types: !7)
-!7 = !{null, !8}
-!8 = !DIBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float)
-!9 = !{!10}
-!10 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "f", linkageName: "_ZN7PR156371fE", line: 6, isLocal: false, isDefinition: true, scope: !5, file: !11, type: !12))
-!11 = !DIFile(filename: "foo.cc", directory: "/usr/local/google/home/echristo/tmp")
-!12 = !DICompositeType(tag: DW_TAG_union_type, name: "Value<float>", line: 2, size: 32, align: 32, file: !1, scope: !5, elements: !13, templateParams: !21)
-!13 = !{!14, !16}
-!14 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 2, size: 32, align: 32, file: !1, scope: !12, baseType: !15)
-!15 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!16 = !DISubprogram(name: "Value", line: 2, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false, scopeLine: 2, file: !1, scope: !12, type: !17)
-!17 = !DISubroutineType(types: !18)
-!18 = !{null, !19}
-!19 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !12)
-!21 = !{!22}
-!22 = !DITemplateTypeParameter(name: "T", type: !8)
-!23 = !DILocalVariable(name: "value", line: 3, arg: 1, scope: !4, file: !11, type: !8)
-!24 = !DILocation(line: 3, scope: !4)
-!25 = !DILocalVariable(name: "tempValue", line: 4, scope: !4, file: !11, type: !12)
-!26 = !DILocation(line: 4, scope: !4)
-!27 = !DILocation(line: 5, scope: !4)
-!28 = !{i32 1, !"Debug Info Version", i32 3}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "f", linkageName: "_ZN7PR156371fE", scope: !2, file: !3, line: 6, type: !4, isLocal: false, isDefinition: true)
+!2 = !DINamespace(name: "PR15637", scope: null, file: !3, line: 1)
+!3 = !DIFile(filename: "foo.cc", directory: "/usr/local/google/home/echristo/tmp")
+!4 = !DICompositeType(tag: DW_TAG_union_type, name: "Value<float>", scope: !2, file: !3, line: 2, size: 32, align: 32, elements: !5, templateParams: !12)
+!5 = !{!6, !8}
+!6 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !4, file: !3, line: 2, baseType: !7, size: 32, align: 32)
+!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!8 = !DISubprogram(name: "Value", scope: !4, file: !3, line: 2, type: !9, isLocal: false, isDefinition: false, scopeLine: 2, virtualIndex: 6, flags: DIFlagArtificial | DIFlagPrototyped, isOptimized: false)
+!9 = !DISubroutineType(types: !10)
+!10 = !{null, !11}
+!11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !4, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!12 = !{!13}
+!13 = !DITemplateTypeParameter(name: "T", type: !14)
+!14 = !DIBasicType(name: "float", size: 32, align: 32, encoding: DW_ATE_float)
+!15 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 3.3 (trunk 178499) (llvm/trunk 178472)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !16, retainedTypes: !16, globals: !17, imports: !16)
+!16 = !{}
+!17 = !{!0}
+!18 = !{i32 1, !"Debug Info Version", i32 3}
+!19 = distinct !DISubprogram(name: "g", linkageName: "_ZN7PR156371gEf", scope: !2, file: !3, line: 3, type: !20, isLocal: false, isDefinition: true, scopeLine: 3, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !15, variables: !16)
+!20 = !DISubroutineType(types: !21)
+!21 = !{null, !14}
+!22 = !DILocalVariable(name: "value", arg: 1, scope: !19, file: !3, line: 3, type: !14)
+!23 = !DIExpression()
+!24 = !DILocation(line: 3, scope: !19)
+!25 = !DILocalVariable(name: "tempValue", scope: !19, file: !3, line: 4, type: !4)
+!26 = !DILocation(line: 4, scope: !19)
+!27 = !DILocation(line: 5, scope: !19)
+
diff --git a/llvm/test/DebugInfo/X86/vector.ll b/llvm/test/DebugInfo/X86/vector.ll
index e755ca4..48a81cb 100644
--- a/llvm/test/DebugInfo/X86/vector.ll
+++ b/llvm/test/DebugInfo/X86/vector.ll
@@ -7,24 +7,25 @@
;
; v4si a
-@a = common global <4 x i32> zeroinitializer, align 16, !dbg !5
+source_filename = "test/DebugInfo/X86/vector.ll"
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!13}
+@a = common global <4 x i32> zeroinitializer, align 16, !dbg !0
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 (trunk 171825) (llvm/trunk 171822)", isOptimized: false, emissionKind: FullDebug, file: !12, enums: !1, retainedTypes: !1, globals: !3, imports: !1)
-!1 = !{}
-!3 = !{!5}
-!5 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "a", line: 3, isLocal: false, isDefinition: true, scope: null, file: !6, type: !7))
-!6 = !DIFile(filename: "foo.c", directory: "/Users/echristo")
-!7 = !DIDerivedType(tag: DW_TAG_typedef, name: "v4si", line: 1, file: !12, baseType: !8)
-!8 = !DICompositeType(tag: DW_TAG_array_type, size: 128, align: 128, flags: DIFlagVector, baseType: !9, elements: !10)
-!9 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!10 = !{!11}
-!11 = !DISubrange(count: 4)
-!12 = !DIFile(filename: "foo.c", directory: "/Users/echristo")
+!llvm.dbg.cu = !{!8}
+!llvm.module.flags = !{!11}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "a", scope: null, file: !2, line: 3, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "foo.c", directory: "/Users/echristo")
+!3 = !DIDerivedType(tag: DW_TAG_typedef, name: "v4si", file: !2, line: 1, baseType: !4)
+!4 = !DICompositeType(tag: DW_TAG_array_type, baseType: !5, size: 128, align: 128, flags: DIFlagVector, elements: !6)
+!5 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!6 = !{!7}
+!7 = !DISubrange(count: 4)
+!8 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, producer: "clang version 3.3 (trunk 171825) (llvm/trunk 171822)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !9, retainedTypes: !9, globals: !10, imports: !9)
+!9 = !{}
; Check that we get an array type with a vector attribute.
; CHECK: DW_TAG_array_type
; CHECK-NEXT: DW_AT_GNU_vector
-!13 = !{i32 1, !"Debug Info Version", i32 3}
+!10 = !{!0}
+!11 = !{i32 1, !"Debug Info Version", i32 3}