diff options
Diffstat (limited to 'test/DebugInfo/piece-verifier.ll')
-rw-r--r-- | test/DebugInfo/piece-verifier.ll | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/test/DebugInfo/piece-verifier.ll b/test/DebugInfo/piece-verifier.ll index 462bf27..fce88cd 100644 --- a/test/DebugInfo/piece-verifier.ll +++ b/test/DebugInfo/piece-verifier.ll @@ -1,4 +1,4 @@ -; RUN: not llvm-as -disable-output -verify-debug-info < %s 2>&1 | FileCheck %s +; RUN: not llvm-as -disable-output < %s 2>&1 | FileCheck %s target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-macosx10.9.0" @@ -23,32 +23,34 @@ attributes #1 = { nounwind readnone } !llvm.module.flags = !{!17, !18} !llvm.ident = !{!19} -!0 = !{!"0x11\0012\00clang version 3.5 \001\00\000\00\001", !1, !2, !2, !3, !2, !2} ; [ DW_TAG_compile_unit ] -!1 = !{!"pieces.c", !""} +!0 = !MDCompileUnit(language: DW_LANG_C99, producer: "clang version 3.5 ", isOptimized: true, emissionKind: 1, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2) +!1 = !MDFile(filename: "pieces.c", directory: "") !2 = !{} !3 = !{!4} -!4 = !{!"0x2e\00foo\00foo\00\003\000\001\000\006\00256\001\003", !1, !5, !6, null, i32 (i64, i32)* @foo, null, null, !15} ; [ DW_TAG_subprogram ] [line 3] [def] [foo] -!5 = !{!"0x29", !1} ; [ DW_TAG_file_type ] [/pieces.c] -!6 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !7, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] +!4 = !MDSubprogram(name: "foo", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 3, file: !1, scope: !5, type: !6, function: i32 (i64, i32)* @foo, variables: !15) +!5 = !MDFile(filename: "pieces.c", directory: "") +!6 = !MDSubroutineType(types: !7) !7 = !{!8, !9} -!8 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed] -!9 = !{!"0x16\00S\001\000\000\000\000", !1, null, !10} ; [ DW_TAG_typedef ] [S] [line 1, size 0, align 0, offset 0] [from ] -!10 = !{!"0x13\00\001\00128\0064\000\000\000", !1, null, null, !11, null, null, null} ; [ DW_TAG_structure_type ] [line 1, size 128, align 64, offset 0] [def] [from ] +!8 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) +!9 = !MDDerivedType(tag: DW_TAG_typedef, name: "S", line: 1, file: !1, baseType: !10) +!10 = !MDCompositeType(tag: DW_TAG_structure_type, line: 1, size: 128, align: 64, file: !1, elements: !11) !11 = !{!12, !14} -!12 = !{!"0xd\00a\001\0064\0064\000\000", !1, !10, !13} ; [ DW_TAG_member ] [a] [line 1, size 64, align 64, offset 0] [from long int] -!13 = !{!"0x24\00long int\000\0064\0064\000\000\005", null, null} ; [ DW_TAG_base_type ] [long int] [line 0, size 64, align 64, offset 0, enc DW_ATE_signed] -!14 = !{!"0xd\00b\001\0032\0032\0064\000", !1, !10, !8} ; [ DW_TAG_member ] [b] [line 1, size 32, align 32, offset 64] [from int] +!12 = !MDDerivedType(tag: DW_TAG_member, name: "a", line: 1, size: 64, align: 64, file: !1, scope: !10, baseType: !13) +!13 = !MDBasicType(tag: DW_TAG_base_type, name: "long int", size: 64, align: 64, encoding: DW_ATE_signed) +!14 = !MDDerivedType(tag: DW_TAG_member, name: "b", line: 1, size: 32, align: 32, offset: 64, file: !1, scope: !10, baseType: !8) !15 = !{!16} -!16 = !{!"0x101\00s\0016777219\000", !4, !5, !9} ; [ DW_TAG_arg_variable ] [s] [line 3] +!16 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "s", line: 3, arg: 1, scope: !4, file: !5, type: !9) !17 = !{i32 2, !"Dwarf Version", i32 4} -!18 = !{i32 1, !"Debug Info Version", i32 2} +!18 = !{i32 1, !"Debug Info Version", i32 3} !19 = !{!"clang version 3.5 "} -!20 = !{!"0x101\00s\0016777219\000", !4, !5, !9} ; [ DW_TAG_arg_variable ] [s] [line 3] +!20 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "s", line: 3, arg: 1, scope: !4, file: !5, type: !9) !21 = !MDLocation(line: 3, scope: !4) -!22 = !{!"0x101\00s\0016777219\000", !4, !5, !9} ; [ DW_TAG_arg_variable ] [s] [line 3] +!22 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "s", line: 3, arg: 1, scope: !4, file: !5, type: !9) !23 = !MDLocation(line: 4, scope: !4) -!24 = !{!"0x102\006\00147\000\008"} ; [ DW_TAG_expression ] [DW_OP_piece 0 8] [piece, size 8, offset 0] +!24 = !MDExpression(DW_OP_deref, DW_OP_bit_piece, 0, 64) !25 = !{} -; This expression has elements after DW_OP_piece. -; CHECK: DIExpression does not Verify -!27 = !{!"0x102\00147\008\004\006"} ; [ DW_TAG_expression ] [DW_OP_piece 8 4] [piece, size 4, offset 8] +; This expression has elements after DW_OP_bit_piece. +; CHECK: invalid expression +; CHECK-NEXT: !MDExpression({{[0-9]+}}, 64, 32, {{[0-9]+}}) +; CHECK-NOT: invalid expression +!27 = !MDExpression(DW_OP_bit_piece, 64, 32, DW_OP_deref) |