summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2016-04-05 23:37:08 +0000
committerDavide Italiano <davide@freebsd.org>2016-04-05 23:37:08 +0000
commitea04026c1355a7ea62c39294736f5cc8828423dc (patch)
tree470ea9e861823d1c01ac38c80ece95596bb59449 /llvm/test
parent5300950f3a2043dede4511e3c311c35fbd387322 (diff)
downloadbcm5719-llvm-ea04026c1355a7ea62c39294736f5cc8828423dc.tar.gz
bcm5719-llvm-ea04026c1355a7ea62c39294736f5cc8828423dc.zip
[DebugInfo] Fix tests so that each subprogram belongs to a CU.
llvm-svn: 265490
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll4
-rw-r--r--llvm/test/Assembler/metadata.ll19
-rw-r--r--llvm/test/CodeGen/MIR/X86/stack-object-debug-info.mir7
-rw-r--r--llvm/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll2
-rw-r--r--llvm/test/Instrumentation/ThreadSanitizer/atomic.ll7
-rw-r--r--llvm/test/Transforms/GVN/load-pre-nonlocal.ll7
-rw-r--r--llvm/test/Transforms/GVN/phi-translate.ll6
-rw-r--r--llvm/test/Transforms/Inline/debug-invoke.ll8
-rw-r--r--llvm/test/Transforms/LoopSimplify/dbg-loc.ll6
-rw-r--r--llvm/test/Transforms/LoopSimplify/single-backedge.ll6
-rw-r--r--llvm/test/Transforms/LoopUnroll/runtime-loop1.ll6
-rw-r--r--llvm/test/Transforms/LoopVectorize/X86/no_fpmath.ll6
-rw-r--r--llvm/test/Transforms/LoopVectorize/runtime-check.ll8
-rw-r--r--llvm/test/Transforms/ObjCARC/basic.ll8
14 files changed, 89 insertions, 11 deletions
diff --git a/llvm/test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll b/llvm/test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll
index 24ceaa4987f..09706c2a4f9 100644
--- a/llvm/test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll
+++ b/llvm/test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll
@@ -22,6 +22,8 @@ define i32 @main() nounwind readonly !dbg !1 {
ret i32 4, !dbg !DILocation(scope: !1)
}
+!llvm.dbg.cu = !{!6}
+
declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
!7 = !{!1}
@@ -33,7 +35,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
!4 = !{!5}
!5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!8 = !DIFile(filename: "/d/j/debug-test.c", directory: "/Volumes/Data/b")
-!9 = !{i32 0}
+!9 = !{}
!llvm.module.flags = !{!10}
!10 = !{i32 1, !"Debug Info Version", i32 3}
diff --git a/llvm/test/Assembler/metadata.ll b/llvm/test/Assembler/metadata.ll
index 8c7781e887d..ee998e3e7e6 100644
--- a/llvm/test/Assembler/metadata.ll
+++ b/llvm/test/Assembler/metadata.ll
@@ -2,7 +2,7 @@
; RUN: verify-uselistorder %s
; CHECK-LABEL: @test
-; CHECK: ret void, !bar !1, !foo !0
+; CHECK: ret void, !bar !4, !foo !5
define void @test() {
add i32 2, 1, !bar !0
add i32 1, 2, !foo !1
@@ -11,29 +11,38 @@ define void @test() {
ret void, !foo !0, !bar !1
}
-; CHECK-LABEL: define void @test2() !foo !2 !baz !3
+; CHECK-LABEL: define void @test2() !foo !6 !baz !7
define void @test2() !foo !2 !baz !3 {
unreachable
}
-; CHECK-LABEL: define void @test3() !bar !3
-; CHECK: unreachable, !bar !4
+; CHECK-LABEL: define void @test3() !bar !7
+; CHECK: unreachable, !bar !8
define void @test3() !bar !3 {
unreachable, !bar !4
}
; CHECK-LABEL: define void @test_attachment_name() {
-; CHECK: unreachable, !\342abc !4
+; CHECK: unreachable, !\342abc !8
define void @test_attachment_name() {
;; Escape the first character when printing text IR, since it's a digit
unreachable, !\34\32abc !4
}
+!llvm.module.flags = !{!7}
+!llvm.dbg.cu = !{!5}
!0 = !DILocation(line: 662302, column: 26, scope: !1)
!1 = distinct !DISubprogram(name: "foo")
!2 = distinct !{}
!3 = distinct !{}
!4 = distinct !{}
+!5 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
+ file: !6,
+ isOptimized: true, flags: "-O2",
+ splitDebugFilename: "abc.debug", emissionKind: 2,
+ subprograms: !{!1})
+!6 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
+!7 = !{i32 2, !"Debug Info Version", i32 3}
declare void @llvm.dbg.func.start(metadata) nounwind readnone
diff --git a/llvm/test/CodeGen/MIR/X86/stack-object-debug-info.mir b/llvm/test/CodeGen/MIR/X86/stack-object-debug-info.mir
index b852dea0451..d30ee39a7e7 100644
--- a/llvm/test/CodeGen/MIR/X86/stack-object-debug-info.mir
+++ b/llvm/test/CodeGen/MIR/X86/stack-object-debug-info.mir
@@ -31,7 +31,8 @@
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!3}
- !0 = distinct !DICompileUnit(language: DW_LANG_C89, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2)
+ !0 = distinct !DICompileUnit(language: DW_LANG_C89, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2,
+ subprograms: !{!5})
!1 = !DIFile(filename: "t.c", directory: "")
!2 = !{}
!3 = !{i32 1, !"Debug Info Version", i32 3}
@@ -52,8 +53,8 @@ frameInfo:
maxAlignment: 16
# CHECK-LABEL: foo
# CHECK: stack:
-# CHECK: - { id: 0, name: y.i, offset: 0, size: 256, alignment: 16, di-variable: '!4',
-# CHECK-NEXT: di-expression: '!10', di-location: '!11' }
+# CHECK: - { id: 0, name: y.i, offset: 0, size: 256, alignment: 16, di-variable: '!6',
+# CHECK-NEXT: di-expression: '!11', di-location: '!12' }
stack:
- { id: 0, name: y.i, offset: 0, size: 256, alignment: 16, di-variable: '!4',
di-expression: '!7', di-location: '!8' }
diff --git a/llvm/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll b/llvm/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll
index 5058ad3291d..18bed613cd3 100644
--- a/llvm/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll
+++ b/llvm/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll
@@ -53,7 +53,7 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
!2 = distinct !DILexicalBlock(line: 44, column: 0, file: !101, scope: !3)
!3 = distinct !DISubprogram(name: "getClosestDiagonal3", linkageName: "_Z19getClosestDiagonal3ii", line: 44, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !101, scope: null, type: !6)
!4 = !DIFile(filename: "ggEdgeDiscrepancy.cc", directory: "/Volumes/Home/grosbaj/sources/llvm-externals/speccpu2000/benchspec/CINT2000/252.eon/src")
-!5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build 00)", isOptimized: true, emissionKind: FullDebug, file: !101, enums: !102, retainedTypes: !102, subprograms: !103)
+!5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build 00)", isOptimized: true, emissionKind: FullDebug, file: !101, enums: !102, retainedTypes: !102, subprograms: !{!3, !37, !41, !42, !77})
!6 = !DISubroutineType(types: !7)
!7 = !{!8, !22, !22}
!8 = !DICompositeType(tag: DW_TAG_structure_type, name: "ggVector3", line: 66, size: 192, align: 32, file: !99, elements: !10)
diff --git a/llvm/test/Instrumentation/ThreadSanitizer/atomic.ll b/llvm/test/Instrumentation/ThreadSanitizer/atomic.ll
index 71dca94efa8..54f2c358fc4 100644
--- a/llvm/test/Instrumentation/ThreadSanitizer/atomic.ll
+++ b/llvm/test/Instrumentation/ThreadSanitizer/atomic.ll
@@ -2022,6 +2022,7 @@ entry:
; CHECK: call void @__tsan_atomic_thread_fence(i32 5), !dbg
!llvm.module.flags = !{!0, !1, !2}
+!llvm.dbg.cu = !{!8}
!0 = !{i32 2, !"Dwarf Version", i32 4}
!1 = !{i32 2, !"Debug Info Version", i32 3}
!2 = !{i32 1, !"PIC Level", i32 2}
@@ -2031,3 +2032,9 @@ entry:
!5 = !DIFile(filename: "atomic.cpp", directory: "/tmp")
!6 = distinct !DISubprogram(name: "test", scope: !5, file: !5, line: 99, type: !4, isLocal: false, isDefinition: true, scopeLine: 100, flags: DIFlagPrototyped, isOptimized: false, variables: !3)
!7 = !DILocation(line: 100, column: 1, scope: !6)
+
+!8 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
+ file: !5,
+ isOptimized: true, flags: "-O2",
+ splitDebugFilename: "abc.debug", emissionKind: 2,
+ subprograms: !{!6})
diff --git a/llvm/test/Transforms/GVN/load-pre-nonlocal.ll b/llvm/test/Transforms/GVN/load-pre-nonlocal.ll
index e0e88665307..70bf49209dd 100644
--- a/llvm/test/Transforms/GVN/load-pre-nonlocal.ll
+++ b/llvm/test/Transforms/GVN/load-pre-nonlocal.ll
@@ -92,6 +92,7 @@ if.end:
!6 = !{!"int", !3, i64 0}
!llvm.module.flags = !{!7, !8, !9}
+!llvm.dbg.cu = !{!18}
!7 = !{i32 2, !"Dwarf Version", i32 4}
!8 = !{i32 2, !"Debug Info Version", i32 3}
!9 = !{i32 1, !"PIC Level", i32 2}
@@ -104,4 +105,8 @@ if.end:
!15 = !DILocation(line: 101, column: 1, scope: !13)
!16 = !DILocation(line: 102, column: 1, scope: !13)
!17 = !DILocation(line: 103, column: 1, scope: !13)
-
+!18 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
+ file: !12,
+ isOptimized: true, flags: "-O2",
+ splitDebugFilename: "abc.debug", emissionKind: 2,
+ subprograms: !{!13})
diff --git a/llvm/test/Transforms/GVN/phi-translate.ll b/llvm/test/Transforms/GVN/phi-translate.ll
index 67036ab9746..281e88f05b1 100644
--- a/llvm/test/Transforms/GVN/phi-translate.ll
+++ b/llvm/test/Transforms/GVN/phi-translate.ll
@@ -37,6 +37,7 @@ end:
}
!llvm.module.flags = !{!0, !1, !2}
+!llvm.dbg.cu = !{!12}
!0 = !{i32 2, !"Dwarf Version", i32 4}
!1 = !{i32 2, !"Debug Info Version", i32 3}
!2 = !{i32 1, !"PIC Level", i32 2}
@@ -50,3 +51,8 @@ end:
!9 = !DILocation(line: 45, column: 1, scope: !6)
!10 = !DILocation(line: 46, column: 1, scope: !6)
!11 = !DILocation(line: 47, column: 1, scope: !6)
+!12 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
+ file: !5,
+ isOptimized: true, flags: "-O2",
+ splitDebugFilename: "abc.debug", emissionKind: 2,
+ subprograms: !{!6})
diff --git a/llvm/test/Transforms/Inline/debug-invoke.ll b/llvm/test/Transforms/Inline/debug-invoke.ll
index c547559d8c2..b1cb9ea5a3a 100644
--- a/llvm/test/Transforms/Inline/debug-invoke.ll
+++ b/llvm/test/Transforms/Inline/debug-invoke.ll
@@ -31,7 +31,15 @@ lpad:
}
!llvm.module.flags = !{!1}
+!llvm.dbg.cu = !{!5}
+
!1 = !{i32 2, !"Debug Info Version", i32 3}
!2 = distinct !DISubprogram()
!3 = !DILocation(line: 1, scope: !2)
!4 = !DILocation(line: 2, scope: !2)
+!5 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
+ file: !6,
+ isOptimized: true, flags: "-O2",
+ splitDebugFilename: "abc.debug", emissionKind: 2,
+ subprograms: !{!2})
+!6 = !DIFile(filename: "path/davidino", directory: "/path/to/dir")
diff --git a/llvm/test/Transforms/LoopSimplify/dbg-loc.ll b/llvm/test/Transforms/LoopSimplify/dbg-loc.ll
index b0e14bbcfd7..23a60481db6 100644
--- a/llvm/test/Transforms/LoopSimplify/dbg-loc.ll
+++ b/llvm/test/Transforms/LoopSimplify/dbg-loc.ll
@@ -73,6 +73,7 @@ eh.resume: ; preds = %catch
; CHECK-DAG: [[LPAD_PREHEADER_LOC]] = !DILocation(line: 85, column: 1, scope: !{{[0-9]+}})
!llvm.module.flags = !{!0, !1, !2}
+!llvm.dbg.cu = !{!14}
!0 = !{i32 2, !"Dwarf Version", i32 4}
!1 = !{i32 2, !"Debug Info Version", i32 3}
!2 = !{i32 1, !"PIC Level", i32 2}
@@ -88,3 +89,8 @@ eh.resume: ; preds = %catch
!11 = !DILocation(line: 73, column: 46, scope: !6)
!12 = !DILocation(line: 75, column: 9, scope: !6)
!13 = !DILocation(line: 85, column: 1, scope: !6)
+!14 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
+ file: !5,
+ isOptimized: true, flags: "-O2",
+ splitDebugFilename: "abc.debug", emissionKind: 2,
+ subprograms: !{!6})
diff --git a/llvm/test/Transforms/LoopSimplify/single-backedge.ll b/llvm/test/Transforms/LoopSimplify/single-backedge.ll
index 6f3db8fb14f..40e903ea570 100644
--- a/llvm/test/Transforms/LoopSimplify/single-backedge.ll
+++ b/llvm/test/Transforms/LoopSimplify/single-backedge.ll
@@ -24,6 +24,7 @@ BE2: ; preds = %n br label %Loop
}
!llvm.module.flags = !{!0, !1}
+!llvm.dbg.cu = !{!12}
!0 = !{i32 2, !"Dwarf Version", i32 4}
!1 = !{i32 2, !"Debug Info Version", i32 3}
@@ -37,3 +38,8 @@ BE2: ; preds = %n br label %Loop
!9 = !DILocation(line: 103, column: 1, scope: !5)
!10 = !DILocation(line: 104, column: 1, scope: !5)
!11 = !DILocation(line: 105, column: 1, scope: !5)
+!12 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
+ file: !4,
+ isOptimized: true, flags: "-O2",
+ splitDebugFilename: "abc.debug", emissionKind: 2,
+ subprograms: !{!5})
diff --git a/llvm/test/Transforms/LoopUnroll/runtime-loop1.ll b/llvm/test/Transforms/LoopUnroll/runtime-loop1.ll
index b8ab3ca60c1..a5dfb553f5e 100644
--- a/llvm/test/Transforms/LoopUnroll/runtime-loop1.ll
+++ b/llvm/test/Transforms/LoopUnroll/runtime-loop1.ll
@@ -53,6 +53,7 @@ for.end: ; preds = %for.body, %entry
}
!llvm.module.flags = !{!0, !1, !2}
+!llvm.dbg.cu = !{!11}
!0 = !{i32 2, !"Dwarf Version", i32 4}
!1 = !{i32 2, !"Debug Info Version", i32 3}
!2 = !{i32 1, !"PIC Level", i32 2}
@@ -65,3 +66,8 @@ for.end: ; preds = %for.body, %entry
!8 = !DILocation(line: 101, column: 1, scope: !6)
!9 = !DILocation(line: 102, column: 1, scope: !6)
!10 = !DILocation(line: 103, column: 1, scope: !6)
+!11 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
+ file: !5,
+ isOptimized: true, flags: "-O2",
+ splitDebugFilename: "abc.debug", emissionKind: 2,
+ subprograms: !{!6})
diff --git a/llvm/test/Transforms/LoopVectorize/X86/no_fpmath.ll b/llvm/test/Transforms/LoopVectorize/X86/no_fpmath.ll
index 0bb78ce177f..eee6dd83788 100644
--- a/llvm/test/Transforms/LoopVectorize/X86/no_fpmath.ll
+++ b/llvm/test/Transforms/LoopVectorize/X86/no_fpmath.ll
@@ -71,6 +71,7 @@ for.body: ; preds = %for.body.preheader,
attributes #0 = { nounwind }
+!llvm.dbg.cu = !{!28}
!llvm.module.flags = !{!0, !1}
!llvm.ident = !{!2}
@@ -102,3 +103,8 @@ attributes #0 = { nounwind }
!25 = !DILocation(line: 17, column: 11, scope: !20)
!26 = distinct !{!26, !27, !18}
!27 = !{!"llvm.loop.vectorize.enable", i1 true}
+!28 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
+ file: !5,
+ isOptimized: true, flags: "-O2",
+ splitDebugFilename: "abc.debug", emissionKind: 2,
+ subprograms: !{!4, !20})
diff --git a/llvm/test/Transforms/LoopVectorize/runtime-check.ll b/llvm/test/Transforms/LoopVectorize/runtime-check.ll
index 3673b71db30..02751e4b25c 100644
--- a/llvm/test/Transforms/LoopVectorize/runtime-check.ll
+++ b/llvm/test/Transforms/LoopVectorize/runtime-check.ll
@@ -67,6 +67,7 @@ loopexit:
; CHECK: [[BODY_LOC]] = !DILocation(line: 101, column: 1, scope: !{{.*}})
!llvm.module.flags = !{!0, !1}
+!llvm.dbg.cu = !{!9}
!0 = !{i32 2, !"Dwarf Version", i32 4}
!1 = !{i32 2, !"Debug Info Version", i32 3}
@@ -77,3 +78,10 @@ loopexit:
!6 = !DILocation(line: 100, column: 1, scope: !5)
!7 = !DILocation(line: 101, column: 1, scope: !5)
!8 = !DILocation(line: 102, column: 1, scope: !5)
+!9 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
+ file: !10,
+ isOptimized: true, flags: "-O2",
+ splitDebugFilename: "abc.debug", emissionKind: 2,
+ subprograms: !{!5})
+!10 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
+!11 = !{i32 2, !"Debug Info Version", i32 3}
diff --git a/llvm/test/Transforms/ObjCARC/basic.ll b/llvm/test/Transforms/ObjCARC/basic.ll
index a6fdf5efa1a..61f027c6790 100644
--- a/llvm/test/Transforms/ObjCARC/basic.ll
+++ b/llvm/test/Transforms/ObjCARC/basic.ll
@@ -3037,10 +3037,18 @@ define void @test67(i8* %x) {
}
!llvm.module.flags = !{!1}
+!llvm.dbg.cu = !{!3}
!0 = !{}
!1 = !{i32 1, !"Debug Info Version", i32 3}
!2 = distinct !DISubprogram()
+!3 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
+ file: !4,
+ isOptimized: true, flags: "-O2",
+ splitDebugFilename: "abc.debug", emissionKind: 2,
+ subprograms: !{!2})
+!4 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
+!5 = !{i32 2, !"Debug Info Version", i32 3}
; CHECK: attributes #0 = { nounwind readnone }
; CHECK: attributes [[NUW]] = { nounwind }
OpenPOWER on IntegriCloud