blob: 05d9df26f46d442d7c2f18fb1427d176ccbdafc7 [file] [log] [blame]
David Blaikie3e3eb332016-12-15 23:17:52 +00001; REQUIRES: object-emission
2
3; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump - | FileCheck %s
4
5; Just because there are no scopes/locations on any instructions in the
6; function doesn't mean we can't describe the address range of the function.
7; Check that we do that
8
9; CHECK: DW_TAG_subprogram
10; CHECK-NOT: TAG
11; CHECK: DW_AT_low_pc
12
13; ModuleID = 'noscopes.c'
14source_filename = "noscopes.c"
15target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
16target triple = "x86_64-unknown-linux-gnu"
17
18; Function Attrs: nounwind uwtable
19define void @f() #0 !dbg !6 {
20entry:
21 ret void
22}
23
24attributes #0 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
25
26!llvm.dbg.cu = !{!0}
27!llvm.module.flags = !{!3, !4}
28!llvm.ident = !{!5}
29
30!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 4.0.0 (trunk 289692) (llvm/trunk 289697)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
31!1 = !DIFile(filename: "noscopes.c", directory: "/tmp/dbginfo")
32!2 = !{}
33!3 = !{i32 2, !"Dwarf Version", i32 4}
34!4 = !{i32 2, !"Debug Info Version", i32 3}
35!5 = !{!"clang version 4.0.0 (trunk 289692) (llvm/trunk 289697)"}
36!6 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !7, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !0, variables: !2)
37!7 = !DISubroutineType(types: !8)
38!8 = !{null}
39!9 = !DILocation(line: 2, column: 1, scope: !6)
40