mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
873caddeb4
DWARF v5 specifies that the root file (also given in the DW_AT_name attribute of the compilation unit DIE) should be emitted explicitly to the line table's list of files. This makes the line table more independent of the .debug_info section. We emit the new syntax only for DWARF v5 and later. Fixes the bug found by asan. Also XFAIL the new test for Darwin, which is stuck on DWARF v2, and fix up other tests so they stop failing on Windows. Last but not least, don't break "clang -g" of an assembler file that has .file directives in it. Differential Revision: https://reviews.llvm.org/D44054 llvm-svn: 328805
25 lines
1.1 KiB
LLVM
25 lines
1.1 KiB
LLVM
; RUN: llc -enable-dwarf-directory -mtriple x86_64-apple-darwin10.0.0 < %s | FileCheck %s
|
|
|
|
; Verify that the file name is relative to the directory.
|
|
; rdar://problem/8884898
|
|
; CHECK: file 1 "/Users/manav/one/two" "simple.c"
|
|
|
|
declare i32 @printf(i8*, ...) nounwind
|
|
|
|
define i32 @main() nounwind !dbg !6 {
|
|
ret i32 0
|
|
}
|
|
|
|
!llvm.dbg.cu = !{!2}
|
|
!llvm.module.flags = !{!12}
|
|
|
|
!1 = !DIFile(filename: "simple.c", directory: "/Users/manav/one/two")
|
|
!2 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "LLVM build 00", isOptimized: true, emissionKind: FullDebug, file: !10, enums: !11, retainedTypes: !11)
|
|
!5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
|
|
!6 = distinct !DISubprogram(name: "main", linkageName: "main", line: 9, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !2, file: !10, scope: !1, type: !7)
|
|
!7 = !DISubroutineType(types: !8)
|
|
!8 = !{!5}
|
|
!10 = !DIFile(filename: "simple.c", directory: "/Users/manav/one/two")
|
|
!11 = !{}
|
|
!12 = !{i32 1, !"Debug Info Version", i32 3}
|