2015-01-21 06:37:25 +08:00
; RUN: not llvm-as -disable-output -verify-debug-info < %s 2>&1 | FileCheck %s
; ModuleID = 'test.c'
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.10.0"
; Function Attrs: nounwind ssp uwtable
2015-11-06 06:03:56 +08:00
define i32 @foo ( ) #0 !dbg !4 {
2015-01-21 06:37:25 +08:00
entry:
ret i32 42 , !dbg !13
}
attributes #0 = { nounwind ssp uwtable }
!llvm.dbg.cu = ! { !0 }
!llvm.module.flags = ! { !9 , !10 , !11 }
!llvm.ident = ! { !12 }
2016-04-15 23:57:41 +08:00
!0 = distinct !DICompileUnit ( language: D W _ L A N G _ C 99 , producer: "clang version 3.7.0 " , isOptimized: false , emissionKind: F u l l D e b u g , file: !1 , enums: !2 , retainedTypes: !2 , globals: !2 , imports: !2 )
2015-04-30 00:38:44 +08:00
!1 = !DIFile ( filename: "test.c" , directory: "" )
2015-01-21 06:37:25 +08:00
!2 = ! { }
2016-04-15 23:57:41 +08:00
!4 = distinct !DISubprogram ( name: "foo" , line: 1 , isLocal: false , isDefinition: true , isOptimized: false , unit: !0 , scopeLine: 1 , file: !1 , scope: !5 , type: !6 , variables: !2 )
2015-04-30 00:38:44 +08:00
!5 = !DIFile ( filename: "test.c" , directory: "" )
!6 = !DISubroutineType ( types: !7 )
2015-01-21 06:37:25 +08:00
!7 = ! { !8 }
2015-04-30 00:38:44 +08:00
!8 = !DIBasicType ( 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 )
2015-01-21 06:37:25 +08:00
!9 = ! { i32 2 , !"Dwarf Version" , i32 2 }
2015-03-04 01:24:31 +08:00
!10 = ! { i32 2 , !"Debug Info Version" , i32 3 }
2015-01-21 06:37:25 +08:00
!11 = ! { i32 1 , !"PIC Level" , i32 2 }
!12 = ! { !"clang version 3.7.0 " }
2015-04-30 00:38:44 +08:00
; An old-style DILocation should not pass verify.
2015-03-21 03:26:58 +08:00
; CHECK: invalid !dbg metadata attachment
2015-01-21 06:37:25 +08:00
!13 = ! { i32 2 , i32 2 , !4 , null }