2015-03-16 20:24:02 +00:00
; RUN: not llvm-as -disable-output < %s 2>&1 | FileCheck %s
2015-01-21 00:59:20 +00:00
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.9.0"
; Function Attrs: nounwind ssp uwtable
define i32 @foo ( i64 %s.coerce0 , i32 %s.coerce1 ) #0 {
entry:
call void @llvm.dbg.value ( metadata i64 %s.coerce0 , i64 0 , metadata !20 , metadata !24 ) , !dbg !21
call void @llvm.dbg.value ( metadata i32 %s.coerce1 , i64 0 , metadata !22 , metadata !27 ) , !dbg !21
ret i32 %s.coerce1 , !dbg !23
}
; Function Attrs: nounwind readnone
declare void @llvm.dbg.declare ( metadata , metadata , metadata ) #1
; Function Attrs: nounwind readnone
declare void @llvm.dbg.value ( metadata , i64 , metadata , metadata ) #1
attributes #0 = { nounwind ssp uwtable "no-frame-pointer-elim" = "true" "no-frame-pointer-elim-non-leaf" }
attributes #1 = { nounwind readnone }
!llvm.dbg.cu = ! { !0 }
!llvm.module.flags = ! { !17 , !18 }
!llvm.ident = ! { !19 }
2015-03-03 17:24:31 +00:00
!0 = !MDCompileUnit ( language: D W _ L A N G _ C 99 , 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: "" )
2015-01-21 00:59:20 +00:00
!2 = ! { }
!3 = ! { !4 }
2015-03-03 17:24:31 +00:00
!4 = !MDSubprogram ( name: "foo" , line: 3 , isLocal: false , isDefinition: true , virtualIndex: 6 , flags: D I F l a g P r o t o t y p e d , 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 )
2015-01-21 00:59:20 +00:00
!7 = ! { !8 , !9 }
2015-03-03 17:24:31 +00:00
!8 = !MDBasicType ( tag: D W _ T A G _ b a s e _ type , name: "int" , size: 32 , align: 32 , encoding: D W _ A T E _ s i g n e d )
!9 = !MDDerivedType ( tag: D W _ T A G _ t y p e d e f , name: "S" , line: 1 , file: !1 , baseType: !10 )
!10 = !MDCompositeType ( tag: D W _ T A G _ s t r u c t u r e _ type , line: 1 , size: 128 , align: 64 , file: !1 , elements: !11 )
2015-01-21 00:59:20 +00:00
!11 = ! { !12 , !14 }
2015-03-03 17:24:31 +00:00
!12 = !MDDerivedType ( tag: D W _ T A G _ m e m b e r , name: "a" , line: 1 , size: 64 , align: 64 , file: !1 , scope: !10 , baseType: !13 )
!13 = !MDBasicType ( tag: D W _ T A G _ b a s e _ type , name: "long int" , size: 64 , align: 64 , encoding: D W _ A T E _ s i g n e d )
!14 = !MDDerivedType ( tag: D W _ T A G _ m e m b e r , name: "b" , line: 1 , size: 32 , align: 32 , offset: 64 , file: !1 , scope: !10 , baseType: !8 )
2015-01-21 00:59:20 +00:00
!15 = ! { !16 }
2015-03-03 17:24:31 +00:00
!16 = !MDLocalVariable ( tag: D W _ T A G _ a r g _ v a r i a b l e , name: "s" , line: 3 , arg: 1 , scope: !4 , file: !5 , type: !9 )
2015-01-21 00:59:20 +00:00
!17 = ! { i32 2 , !"Dwarf Version" , i32 4 }
2015-03-03 17:24:31 +00:00
!18 = ! { i32 1 , !"Debug Info Version" , i32 3 }
2015-01-21 00:59:20 +00:00
!19 = ! { !"clang version 3.5 " }
2015-03-03 17:24:31 +00:00
!20 = !MDLocalVariable ( tag: D W _ T A G _ a r g _ v a r i a b l e , name: "s" , line: 3 , arg: 1 , scope: !4 , file: !5 , type: !9 )
2015-01-21 00:59:20 +00:00
!21 = !MDLocation ( line: 3 , scope: !4 )
2015-03-03 17:24:31 +00:00
!22 = !MDLocalVariable ( tag: D W _ T A G _ a r g _ v a r i a b l e , name: "s" , line: 3 , arg: 1 , scope: !4 , file: !5 , type: !9 )
2015-01-21 00:59:20 +00:00
!23 = !MDLocation ( line: 4 , scope: !4 )
2015-03-03 17:24:31 +00:00
!24 = !MDExpression ( D W _ O P _ d e r e f , D W _ O P _ b i t _ p i e c e , 0 , 64 )
2015-01-21 00:59:20 +00:00
!25 = ! { }
2015-02-28 23:57:16 +00:00
; This expression has elements after DW_OP_bit_piece.
2015-03-16 20:24:02 +00:00
; CHECK: invalid expression
; CHECK-NEXT: !MDExpression({{[0-9]+}}, 64, 32, {{[0-9]+}})
; CHECK-NOT: invalid expression
2015-03-03 17:24:31 +00:00
!27 = !MDExpression ( D W _ O P _ b i t _ p i e c e , 64 , 32 , D W _ O P _ d e r e f )