diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-06-16 21:03:24 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-06-16 21:03:24 +0000 |
| commit | 7c7aba6e5fef47a01a136be655b0a92cfd7090f6 (patch) | |
| tree | 99ec531924f6078534b100ab9d7696abce848099 /test/DebugInfo/X86 | |
| parent | 7ab83427af0f77b59941ceba41d509d7d097b065 (diff) | |
Vendor import of llvm trunk r305575:vendor/llvm/llvm-trunk-r305575
Notes
svn path=/vendor/llvm/dist/; revision=320013
svn path=/vendor/llvm/llvm-trunk-r305575/; revision=320014; tag=vendor/llvm/llvm-trunk-r305575
Diffstat (limited to 'test/DebugInfo/X86')
| -rw-r--r-- | test/DebugInfo/X86/block-capture.ll | 2 | ||||
| -rw-r--r-- | test/DebugInfo/X86/debug-info-block-captured-self.ll | 4 | ||||
| -rw-r--r-- | test/DebugInfo/X86/debug-info-blocks.ll | 2 | ||||
| -rw-r--r-- | test/DebugInfo/X86/double-declare.ll | 44 | ||||
| -rw-r--r-- | test/DebugInfo/X86/dw_op_minus.ll | 4 | ||||
| -rw-r--r-- | test/DebugInfo/X86/dw_op_minus_direct.ll | 2 | ||||
| -rw-r--r-- | test/DebugInfo/X86/safestack-byval.ll | 4 | ||||
| -rw-r--r-- | test/DebugInfo/X86/stack-value-dwarf2.ll | 2 | ||||
| -rw-r--r-- | test/DebugInfo/X86/unattached-global.ll | 2 |
9 files changed, 55 insertions, 11 deletions
diff --git a/test/DebugInfo/X86/block-capture.ll b/test/DebugInfo/X86/block-capture.ll index 168040507eef..14927eef59d4 100644 --- a/test/DebugInfo/X86/block-capture.ll +++ b/test/DebugInfo/X86/block-capture.ll @@ -123,7 +123,7 @@ attributes #3 = { nounwind } !66 = !DILocation(line: 2, column: 20, scope: !8) !67 = !DILocation(line: 2, column: 21, scope: !8) !68 = !DILocalVariable(name: "block", line: 2, scope: !8, file: !5, type: !25) -!69 = !DIExpression(DW_OP_deref, DW_OP_plus, 32) +!69 = !DIExpression(DW_OP_deref, DW_OP_plus_uconst, 32) !70 = !DILocation(line: 2, column: 9, scope: !8) !71 = !DILocation(line: 2, column: 23, scope: !72) !72 = distinct !DILexicalBlock(line: 2, column: 21, file: !1, scope: !8) diff --git a/test/DebugInfo/X86/debug-info-block-captured-self.ll b/test/DebugInfo/X86/debug-info-block-captured-self.ll index 1085eaef0d4e..e1620af50255 100644 --- a/test/DebugInfo/X86/debug-info-block-captured-self.ll +++ b/test/DebugInfo/X86/debug-info-block-captured-self.ll @@ -107,5 +107,5 @@ define internal void @"__24-[Main initWithContext:]_block_invoke_2"(i8* %.block_ !106 = !DILocation(line: 40, scope: !42) !107 = !DIFile(filename: "llvm/tools/clang/test/CodeGenObjC/debug-info-block-captured-self.m", directory: "") !108 = !{i32 1, !"Debug Info Version", i32 3} -!109 = !DIExpression(DW_OP_plus, 32, DW_OP_deref) -!110 = !DIExpression(DW_OP_plus, 32, DW_OP_deref) +!109 = !DIExpression(DW_OP_plus_uconst, 32, DW_OP_deref) +!110 = !DIExpression(DW_OP_plus_uconst, 32, DW_OP_deref) diff --git a/test/DebugInfo/X86/debug-info-blocks.ll b/test/DebugInfo/X86/debug-info-blocks.ll index 859eef804bb1..b79ad89be27d 100644 --- a/test/DebugInfo/X86/debug-info-blocks.ll +++ b/test/DebugInfo/X86/debug-info-blocks.ll @@ -380,4 +380,4 @@ attributes #3 = { nounwind } !108 = !DILocation(line: 61, scope: !36) !109 = !DILocation(line: 62, scope: !36) !110 = !{i32 1, !"Debug Info Version", i32 3} -!111 = !DIExpression(DW_OP_deref, DW_OP_plus, 32) +!111 = !DIExpression(DW_OP_deref, DW_OP_plus_uconst, 32) diff --git a/test/DebugInfo/X86/double-declare.ll b/test/DebugInfo/X86/double-declare.ll new file mode 100644 index 000000000000..8ed4319b323a --- /dev/null +++ b/test/DebugInfo/X86/double-declare.ll @@ -0,0 +1,44 @@ +; RUN: llc -mtriple=x86_64-apple-darwin -O0 -filetype=obj -o - < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s +; PR33157. Don't crash on duplicate dbg.declare. +; CHECK: DW_TAG_formal_parameter +; CHECK: DW_AT_location [DW_FORM_exprloc] +; CHECK-NOT: DW_AT_location +@g = external global i32 +@h = external global i32 + +declare void @llvm.dbg.declare(metadata, metadata, metadata) + +define void @f(i32* byval %p, i1 %c) !dbg !5 { + br i1 %c, label %x, label %y + +x: + call void @llvm.dbg.declare(metadata i32* %p, metadata !10, metadata !DIExpression()), !dbg !12 + store i32 42, i32* @g, !dbg !12 + br label %done + +y: + call void @llvm.dbg.declare(metadata i32* %p, metadata !10, metadata !DIExpression()), !dbg !12 + store i32 42, i32* @h, !dbg !12 + br label %done + +done: + ret void +} + +!llvm.dbg.cu = !{!0} +!llvm.module.flags = !{!22, !23} + +!0 = distinct !DICompileUnit(language: DW_LANG_ObjC, file: !1, producer: "clang version 5.0.0 ", isOptimized: true, runtimeVersion: 2, emissionKind: FullDebug) +!1 = !DIFile(filename: "<stdin>", directory: "C:\5Csrc\5Cllvm-project\5Cbuild") +!5 = distinct !DISubprogram(name: "f", isLocal: true, isDefinition: true, scopeLine: 37, flags: DIFlagPrototyped, isOptimized: true, unit: !0, type: !99, scope: !1) +!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) +!10 = !DILocalVariable(name: "aRect", arg: 1, scope: !11, file: !1, line: 38, type: !6) +!11 = distinct !DILexicalBlock(scope: !98, file: !1, line: 38) +!12 = !DILocation(line: 43, scope: !11, inlinedAt: !13) +!13 = distinct !DILocation(line: 43, scope: !5) +!22 = !{i32 2, !"Dwarf Version", i32 4} +!23 = !{i32 2, !"Debug Info Version", i32 3} +!62 = !{!10} +!98 = distinct !DISubprogram(name: "NSMaxX", scope: !1, file: !1, line: 27, isLocal: true, isDefinition: true, scopeLine: 27, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !62, type: !99) +!99 = !DISubroutineType(types: !100) +!100 = !{null} diff --git a/test/DebugInfo/X86/dw_op_minus.ll b/test/DebugInfo/X86/dw_op_minus.ll index 8e65b489c27b..30bf58378005 100644 --- a/test/DebugInfo/X86/dw_op_minus.ll +++ b/test/DebugInfo/X86/dw_op_minus.ll @@ -10,7 +10,7 @@ ; Capture(buf); ; } ; } -; The interesting part is !DIExpression(DW_OP_minus, 400) +; The interesting part is !DIExpression(DW_OP_constu, 400, DW_OP_minus) target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" @@ -56,7 +56,7 @@ declare void @Capture(i32*) !14 = !{i32 2, !"Debug Info Version", i32 3} !15 = !{!"clang version 3.8.0 (trunk 248518) (llvm/trunk 248512)"} !16 = !DILocation(line: 5, column: 3, scope: !4) -!17 = !DIExpression(DW_OP_minus, 400) +!17 = !DIExpression(DW_OP_constu, 400, DW_OP_minus) !18 = !DILocation(line: 5, column: 7, scope: !4) !19 = !DILocation(line: 6, column: 11, scope: !4) !20 = !DILocation(line: 6, column: 3, scope: !4) diff --git a/test/DebugInfo/X86/dw_op_minus_direct.ll b/test/DebugInfo/X86/dw_op_minus_direct.ll index 8d346be532e8..69f4b2c3ef6a 100644 --- a/test/DebugInfo/X86/dw_op_minus_direct.ll +++ b/test/DebugInfo/X86/dw_op_minus_direct.ll @@ -51,7 +51,7 @@ attributes #1 = { nounwind readnone } !10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) !11 = !{!12} !12 = !DILocalVariable(name: "i", arg: 1, scope: !7, file: !1, line: 1, type: !10) -!13 = !DIExpression(DW_OP_minus, 1, DW_OP_stack_value) +!13 = !DIExpression(DW_OP_constu, 1, DW_OP_minus, DW_OP_stack_value) !14 = !DILocation(line: 1, column: 13, scope: !7) !15 = !DILocation(line: 2, column: 11, scope: !7) !16 = !DILocation(line: 2, column: 3, scope: !7) diff --git a/test/DebugInfo/X86/safestack-byval.ll b/test/DebugInfo/X86/safestack-byval.ll index 42e94698818c..8742c90bc298 100644 --- a/test/DebugInfo/X86/safestack-byval.ll +++ b/test/DebugInfo/X86/safestack-byval.ll @@ -14,7 +14,7 @@ ; } ; CHECK: ![[ZZZ:.*]] = !DILocalVariable(name: "zzz", -; CHECK: ![[ZZZ_EXPR:.*]] = !DIExpression(DW_OP_deref, DW_OP_minus, 400) +; CHECK: ![[ZZZ_EXPR:.*]] = !DIExpression(DW_OP_deref, DW_OP_constu, 400, DW_OP_minus) ; CHECK: DBG_VALUE {{.*}} ![[ZZZ]], ![[ZZZ_EXPR]] %struct.S = type { [100 x i32] } @@ -79,7 +79,7 @@ attributes #2 = { argmemonly nounwind } !20 = !{i32 2, !"Debug Info Version", i32 3} !21 = !{!"clang version 3.8.0 (trunk 254107) (llvm/trunk 254109)"} !22 = !DILocation(line: 8, column: 9, scope: !12) -!23 = !DIExpression(DW_OP_deref, DW_OP_minus, 400) +!23 = !DIExpression(DW_OP_deref, DW_OP_constu, 400, DW_OP_minus) !24 = !DILocation(line: 8, column: 28, scope: !12) !25 = !DIExpression() !26 = !DILocation(line: 9, column: 10, scope: !12) diff --git a/test/DebugInfo/X86/stack-value-dwarf2.ll b/test/DebugInfo/X86/stack-value-dwarf2.ll index 61595f7861fe..b653784ec668 100644 --- a/test/DebugInfo/X86/stack-value-dwarf2.ll +++ b/test/DebugInfo/X86/stack-value-dwarf2.ll @@ -93,4 +93,4 @@ attributes #1 = { nounwind readnone } !15 = !DISubprogram(name: "<(lambda at test.ii:87:58)>", scope: !0, file: !1, line: 27, type: !6, isLocal: false, isDefinition: false, scopeLine: 27, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: true, templateParams: !2) !16 = distinct !DILocation(line: 99, column: 21, scope: !17) !17 = !DILexicalBlockFile(scope: !5, file: !1, discriminator: 2) -!18 = !DIExpression(DW_OP_plus, 4, DW_OP_stack_value, DW_OP_LLVM_fragment, 64, 32) +!18 = !DIExpression(DW_OP_plus_uconst, 4, DW_OP_stack_value, DW_OP_LLVM_fragment, 64, 32) diff --git a/test/DebugInfo/X86/unattached-global.ll b/test/DebugInfo/X86/unattached-global.ll index 5d4be7377ef4..5e9af695c8dc 100644 --- a/test/DebugInfo/X86/unattached-global.ll +++ b/test/DebugInfo/X86/unattached-global.ll @@ -12,7 +12,7 @@ target triple = "x86_64-unknown-linux-gnu" !1 = !{!2} !2 = !DIGlobalVariableExpression(var: !3, expr: !4) !3 = distinct !DIGlobalVariable(name: "a", scope: null, isLocal: false, isDefinition: true, type: !6) -!4 = !DIExpression(DW_OP_plus, 4) +!4 = !DIExpression(DW_OP_plus_uconst, 4) !5 = !DIFile(filename: "<stdin>", directory: "/") !6 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) |
