summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/Generic
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/DebugInfo/Generic')
-rw-r--r--llvm/test/DebugInfo/Generic/2010-04-06-NestedFnDbgInfo.ll3
-rw-r--r--llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll3
-rw-r--r--llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll6
-rw-r--r--llvm/test/DebugInfo/Generic/namespace.ll30
-rw-r--r--llvm/test/DebugInfo/Generic/nodebug.ll6
5 files changed, 27 insertions, 21 deletions
diff --git a/llvm/test/DebugInfo/Generic/2010-04-06-NestedFnDbgInfo.ll b/llvm/test/DebugInfo/Generic/2010-04-06-NestedFnDbgInfo.ll
index 610b55c903e..3eaedd816a8 100644
--- a/llvm/test/DebugInfo/Generic/2010-04-06-NestedFnDbgInfo.ll
+++ b/llvm/test/DebugInfo/Generic/2010-04-06-NestedFnDbgInfo.ll
@@ -74,7 +74,7 @@ entry:
!1 = distinct !DILexicalBlock(line: 15, column: 12, file: !38, scope: !2)
!2 = distinct !DISubprogram(name: "main", linkageName: "main", line: 15, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 15, file: !38, scope: !3, type: !5)
!3 = !DIFile(filename: "one.cc", directory: "/tmp")
-!4 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang 1.5", isOptimized: false, emissionKind: 0, file: !38, enums: !39, retainedTypes: !39, subprograms: !37, imports: null)
+!4 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang 1.5", isOptimized: false, emissionKind: 0, file: !38, enums: !39, retainedTypes: !41, subprograms: !37, imports: null)
!5 = !DISubroutineType(types: !6)
!6 = !{!7}
!7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
@@ -112,3 +112,4 @@ entry:
!38 = !DIFile(filename: "one.cc", directory: "/tmp")
!39 = !{}
!40 = !{i32 1, !"Debug Info Version", i32 3}
+!41 = !{!21} \ No newline at end of file
diff --git a/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll b/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll
index f01cf6db905..10bc50cc85e 100644
--- a/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll
+++ b/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll
@@ -27,7 +27,7 @@ entry:
!0 = distinct !DISubprogram(name: "foo", line: 9, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: true, 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: 0, file: !27, enums: !20, retainedTypes: !20, subprograms: !25, globals: !26, imports: !20)
+!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: 0, file: !27, enums: !20, retainedTypes: !61, subprograms: !25, 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)
@@ -39,6 +39,7 @@ entry:
!59 = !DILocalVariable(name: "j", line: 9, arg: 1, scope: !0, file: !1, type: !5)
!60 = !DILocalVariable(name: "xyz", line: 10, scope: !11, file: !1, type: !12)
+!61 = !{!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)
diff --git a/llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll b/llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll
index 1713ea112d4..cbe192075ad 100644
--- a/llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll
+++ b/llvm/test/DebugInfo/Generic/cross-cu-linkonce-distinct.ll
@@ -32,7 +32,7 @@
; CHECK: DW_AT_name {{.*}} "func"
; CHECK: DW_TAG_compile_unit
-; FIXME: Maybe we should drop the subprogram here - since the function was
+; Check that the subprogram is dropped in this CU - since the function was
; emitted in one CU, due to linkonce_odr uniquing. We certainly don't emit the
; subprogram here if the source location for this definition is the same (see
; test/DebugInfo/cross-cu-linkonce.ll), though it's very easy to tickle that
@@ -43,7 +43,7 @@
; directory of the source file even though the file name is absolute, not
; relative)
-; CHECK: DW_TAG_subprogram
+; CHECK-NOT: DW_TAG_subprogram
@x = global i32 (i32)* @_Z4funci, align 8
@y = global i32 (i32)* @_Z4funci, align 8
@@ -64,7 +64,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
attributes #0 = { inlinehint 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 = !{!12, !0}
+!llvm.dbg.cu = !{!0, !12}
!llvm.module.flags = !{!19, !20}
!llvm.ident = !{!21, !21}
diff --git a/llvm/test/DebugInfo/Generic/namespace.ll b/llvm/test/DebugInfo/Generic/namespace.ll
index e446806249f..e1769758551 100644
--- a/llvm/test/DebugInfo/Generic/namespace.ll
+++ b/llvm/test/DebugInfo/Generic/namespace.ll
@@ -23,6 +23,11 @@
; CHECK-NOT: NULL
; CHECK: [[BAR:0x[0-9a-f]*]]:{{ *}}DW_TAG_structure_type
; CHECK-NEXT: DW_AT_name{{.*}}= "bar"
+; CHECK: DW_TAG_subprogram
+; CHECK-NOT: DW_TAG
+; CHECK: DW_AT_MIPS_linkage_name
+; CHECK-NOT: DW_TAG
+; CHECK: DW_AT_name{{.*}}= "f1"
; CHECK: [[FUNC1:.*]]: DW_TAG_subprogram
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_MIPS_linkage_name
@@ -45,11 +50,6 @@
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_name{{.*}}= "func_fwd"
; CHECK-NOT: DW_AT_declaration
-; CHECK: DW_TAG_subprogram
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_MIPS_linkage_name
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name{{.*}}= "f1"
; CHECK: NULL
; CHECK-NOT: NULL
@@ -71,10 +71,23 @@
; CHECK: DW_TAG_subprogram
; CHECK-NOT: DW_TAG
+; CHECK: DW_AT_name{{.*}}= "__cxx_global_var_init"
+; CHECK-NOT: DW_TAG
+
+; CHECK: DW_TAG_subprogram
+; CHECK-NOT: DW_TAG
; CHECK: DW_AT_MIPS_linkage_name
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_name{{.*}}= "func"
; CHECK-NOT: NULL
+; CHECK: DW_TAG_lexical_block
+; CHECK-NOT: NULL
+; CHECK: DW_TAG_imported_module
+; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
+; CHECK-NEXT: DW_AT_decl_line{{.*}}(23)
+; CHECK-NEXT: DW_AT_import{{.*}}=>
+; CHECK: NULL
+; CHECK-NOT: NULL
; CHECK: DW_TAG_imported_module
; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
; CHECK-NEXT: DW_AT_decl_line{{.*}}(26)
@@ -134,13 +147,6 @@
; CHECK-NEXT: DW_AT_decl_line{{.*}}(37)
; CHECK-NEXT: DW_AT_import{{.*}}=> {[[FUNC_FWD]]})
-; CHECK: DW_TAG_lexical_block
-; CHECK-NOT: NULL
-; CHECK: DW_TAG_imported_module
-; CHECK-NEXT: DW_AT_decl_file{{.*}}([[F2]])
-; CHECK-NEXT: DW_AT_decl_line{{.*}}(23)
-; CHECK-NEXT: DW_AT_import{{.*}}=>
-; CHECK: NULL
; CHECK: NULL
; CHECK: NULL
diff --git a/llvm/test/DebugInfo/Generic/nodebug.ll b/llvm/test/DebugInfo/Generic/nodebug.ll
index 6f20aecaaf5..7aafc8d5fa1 100644
--- a/llvm/test/DebugInfo/Generic/nodebug.ll
+++ b/llvm/test/DebugInfo/Generic/nodebug.ll
@@ -16,10 +16,8 @@
; f1();
; }
-; Check that there's only one DW_TAG_subprogram, nothing for the 'f2' function.
-; CHECK: DW_TAG_subprogram
-; CHECK-NOT: DW_TAG
-; CHECK: DW_AT_name {{.*}} "f1"
+; Check that there is no DW_TAG_subprogram, nothing for the 'f2' function.
+; Note: No debug info was emitted for 'f1' function because it has no code.
; CHECK-NOT: DW_TAG_subprogram
@i = external global i32
OpenPOWER on IntegriCloud