blob: aa725a2369a4c91bc784521f9d9f441e516b2e16 [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
Duncan P. N. Exon Smith55ca9642015-08-03 17:26:41 +000018!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 ", isOptimized: false, emissionKind: 1, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, 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 = !{}
21!3 = !{!4}
Peter Collingbourned4bff302015-11-05 22:03:56 +000022!4 = distinct !DISubprogram(name: "foo", line: 1, isLocal: false, isDefinition: true, isOptimized: false, scopeLine: 1, file: !1, scope: !5, type: !6, variables: !2)
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000023!5 = !DIFile(filename: "test.c", directory: "")
24!6 = !DISubroutineType(types: !7)
Adrian Prantlde200df2015-01-20 22:37:25 +000025!7 = !{!8}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000026!8 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
Adrian Prantlde200df2015-01-20 22:37:25 +000027!9 = !{i32 2, !"Dwarf Version", i32 2}
Duncan P. N. Exon Smithe2741802015-03-03 17:24:31 +000028!10 = !{i32 2, !"Debug Info Version", i32 3}
Adrian Prantlde200df2015-01-20 22:37:25 +000029!11 = !{i32 1, !"PIC Level", i32 2}
30!12 = !{!"clang version 3.7.0 "}
Duncan P. N. Exon Smitha9308c42015-04-29 16:38:44 +000031; An old-style DILocation should not pass verify.
Duncan P. N. Exon Smitha3bdc322015-03-20 19:26:58 +000032; CHECK: invalid !dbg metadata attachment
Adrian Prantlde200df2015-01-20 22:37:25 +000033!13 = !{i32 2, i32 2, !4, null}