blob: 3decb7c9f17ab0ea6442b92b174b66ad983d0a93 [file] [log] [blame]
Adrian Prantlde200df2015-01-20 22:37:25 +00001; RUN: not llvm-as -disable-output -verify-debug-info < %s 2>&1 | FileCheck %s
2; ModuleID = 'test.c'
3target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
4target triple = "x86_64-apple-macosx10.10.0"
5
6; Function Attrs: nounwind ssp uwtable
Peter Collingbourned4bff302015-11-05 22:03:56 +00007define i32 @foo() #0 !dbg !4 {
Adrian Prantlde200df2015-01-20 22:37:25 +00008entry:
9 ret i32 42, !dbg !13
10}
11
12attributes #0 = { nounwind ssp uwtable }
13
14!llvm.dbg.cu = !{!0}
15!llvm.module.flags = !{!9, !10, !11}
16!llvm.ident = !{!12}
17
Adrian Prantl75819ae2016-04-15 15:57:41 +000018!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 ", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000019!1 = !DIFile(filename: "test.c", directory: "")
Adrian Prantlde200df2015-01-20 22:37:25 +000020!2 = !{}
Adrian Prantl75819ae2016-04-15 15:57:41 +000021!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)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000022!5 = !DIFile(filename: "test.c", directory: "")
23!6 = !DISubroutineType(types: !7)
Adrian Prantlde200df2015-01-20 22:37:25 +000024!7 = !{!8}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000025!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
Adrian Prantlde200df2015-01-20 22:37:25 +000026!9 = !{i32 2, !"Dwarf Version", i32 2}
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000027!10 = !{i32 2, !"Debug Info Version", i32 3}
Adrian Prantlde200df2015-01-20 22:37:25 +000028!11 = !{i32 1, !"PIC Level", i32 2}
29!12 = !{!"clang version 3.7.0 "}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000030; An old-style DILocation should not pass verify.
Duncan P. N. Exon Smitha3bdc322015-03-20 19:26:58 +000031; CHECK: invalid !dbg metadata attachment
Adrian Prantlde200df2015-01-20 22:37:25 +000032!13 = !{i32 2, i32 2, !4, null}