Duncan P. N. Exon Smith | 18e9207 | 2015-03-16 20:24:02 +0000 | [diff] [blame] | 1 | ; RUN: not llvm-as -disable-output < %s 2>&1 | FileCheck %s |
Adrian Prantl | 34bcbee | 2015-01-21 00:59:20 +0000 | [diff] [blame] | 2 | target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" |
| 3 | target triple = "x86_64-apple-macosx10.9.0" |
| 4 | |
| 5 | ; Function Attrs: nounwind ssp uwtable |
| 6 | define i32 @foo(i64 %s.coerce0, i32 %s.coerce1) #0 { |
| 7 | entry: |
| 8 | call void @llvm.dbg.value(metadata i64 %s.coerce0, i64 0, metadata !20, metadata !24), !dbg !21 |
| 9 | call void @llvm.dbg.value(metadata i32 %s.coerce1, i64 0, metadata !22, metadata !27), !dbg !21 |
| 10 | ret i32 %s.coerce1, !dbg !23 |
| 11 | } |
| 12 | |
| 13 | ; Function Attrs: nounwind readnone |
| 14 | declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 |
| 15 | |
| 16 | ; Function Attrs: nounwind readnone |
| 17 | declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #1 |
| 18 | |
| 19 | attributes #0 = { nounwind ssp uwtable "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" } |
| 20 | attributes #1 = { nounwind readnone } |
| 21 | |
| 22 | !llvm.dbg.cu = !{!0} |
| 23 | !llvm.module.flags = !{!17, !18} |
| 24 | !llvm.ident = !{!19} |
| 25 | |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 26 | !0 = !DICompileUnit(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) |
| 27 | !1 = !DIFile(filename: "pieces.c", directory: "") |
Adrian Prantl | 34bcbee | 2015-01-21 00:59:20 +0000 | [diff] [blame] | 28 | !2 = !{} |
| 29 | !3 = !{!4} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 30 | !4 = !DISubprogram(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) |
| 31 | !5 = !DIFile(filename: "pieces.c", directory: "") |
| 32 | !6 = !DISubroutineType(types: !7) |
Adrian Prantl | 34bcbee | 2015-01-21 00:59:20 +0000 | [diff] [blame] | 33 | !7 = !{!8, !9} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 34 | !8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) |
| 35 | !9 = !DIDerivedType(tag: DW_TAG_typedef, name: "S", line: 1, file: !1, baseType: !10) |
| 36 | !10 = !DICompositeType(tag: DW_TAG_structure_type, line: 1, size: 128, align: 64, file: !1, elements: !11) |
Adrian Prantl | 34bcbee | 2015-01-21 00:59:20 +0000 | [diff] [blame] | 37 | !11 = !{!12, !14} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 38 | !12 = !DIDerivedType(tag: DW_TAG_member, name: "a", line: 1, size: 64, align: 64, file: !1, scope: !10, baseType: !13) |
| 39 | !13 = !DIBasicType(tag: DW_TAG_base_type, name: "long int", size: 64, align: 64, encoding: DW_ATE_signed) |
| 40 | !14 = !DIDerivedType(tag: DW_TAG_member, name: "b", line: 1, size: 32, align: 32, offset: 64, file: !1, scope: !10, baseType: !8) |
Adrian Prantl | 34bcbee | 2015-01-21 00:59:20 +0000 | [diff] [blame] | 41 | !15 = !{!16} |
Duncan P. N. Exon Smith | ed013cd | 2015-07-31 18:58:39 +0000 | [diff] [blame^] | 42 | !16 = !DILocalVariable(name: "s", line: 3, arg: 1, scope: !4, file: !5, type: !9) |
Adrian Prantl | 34bcbee | 2015-01-21 00:59:20 +0000 | [diff] [blame] | 43 | !17 = !{i32 2, !"Dwarf Version", i32 4} |
Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 44 | !18 = !{i32 1, !"Debug Info Version", i32 3} |
Adrian Prantl | 34bcbee | 2015-01-21 00:59:20 +0000 | [diff] [blame] | 45 | !19 = !{!"clang version 3.5 "} |
Duncan P. N. Exon Smith | ed013cd | 2015-07-31 18:58:39 +0000 | [diff] [blame^] | 46 | !20 = !DILocalVariable(name: "s", line: 3, arg: 1, scope: !4, file: !5, type: !9) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 47 | !21 = !DILocation(line: 3, scope: !4) |
Duncan P. N. Exon Smith | ed013cd | 2015-07-31 18:58:39 +0000 | [diff] [blame^] | 48 | !22 = !DILocalVariable(name: "s", line: 3, arg: 1, scope: !4, file: !5, type: !9) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 49 | !23 = !DILocation(line: 4, scope: !4) |
| 50 | !24 = !DIExpression(DW_OP_deref, DW_OP_bit_piece, 0, 64) |
Adrian Prantl | 34bcbee | 2015-01-21 00:59:20 +0000 | [diff] [blame] | 51 | !25 = !{} |
Duncan P. N. Exon Smith | d0c2a99 | 2015-02-28 23:57:16 +0000 | [diff] [blame] | 52 | ; This expression has elements after DW_OP_bit_piece. |
Duncan P. N. Exon Smith | 18e9207 | 2015-03-16 20:24:02 +0000 | [diff] [blame] | 53 | ; CHECK: invalid expression |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 54 | ; CHECK-NEXT: !DIExpression({{[0-9]+}}, 64, 32, {{[0-9]+}}) |
Duncan P. N. Exon Smith | 18e9207 | 2015-03-16 20:24:02 +0000 | [diff] [blame] | 55 | ; CHECK-NOT: invalid expression |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 56 | !27 = !DIExpression(DW_OP_bit_piece, 64, 32, DW_OP_deref) |