1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/test/DebugInfo/Generic/2010-05-10-MultipleCU.ll
Adrian Prantl 37ec73c718 llvm-dwarfdump: Replace -debug-dump=sect option with individual options.
As discussed on llvm-dev in
http://lists.llvm.org/pipermail/llvm-dev/2017-September/117301.html
this changes the command line interface of llvm-dwarfdump to match the
one used by the dwarfdump utility shipping on macOS. In addition to
being shorter to type this format also has the advantage of allowing
more than one section to be specified at the same time.

In a nutshell, with this change

  $ llvm-dwarfdump --debug-dump=info
  $ llvm-dwarfdump --debug-dump=apple-objc

becomes

  $ dwarfdump --debug-info --apple-objc

Differential Revision: https://reviews.llvm.org/D37714

llvm-svn: 312970
2017-09-11 22:59:45 +00:00

45 lines
2.0 KiB
LLVM

; REQUIRES: object-emission
; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -debug-info - | FileCheck %s
; Check that two compile units are generated
; CHECK: Compile Unit:
; CHECK: Compile Unit:
define i32 @foo() nounwind readnone ssp !dbg !2 {
return:
ret i32 42, !dbg !0
}
define i32 @bar() nounwind readnone ssp !dbg !10 {
return:
ret i32 21, !dbg !8
}
!llvm.dbg.cu = !{!4, !12}
!llvm.module.flags = !{!21}
!16 = !{!2}
!17 = !{!10}
!0 = !DILocation(line: 3, scope: !1)
!1 = distinct !DILexicalBlock(line: 2, column: 0, file: !18, scope: !2)
!2 = distinct !DISubprogram(name: "foo", linkageName: "foo", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !4, file: !18, scope: !3, type: !5)
!3 = !DIFile(filename: "a.c", directory: "/tmp/")
!4 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !18, enums: !19, retainedTypes: !19)
!5 = !DISubroutineType(types: !6)
!6 = !{!7}
!7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!8 = !DILocation(line: 3, scope: !9)
!9 = distinct !DILexicalBlock(line: 2, column: 0, file: !20, scope: !10)
!10 = distinct !DISubprogram(name: "bar", linkageName: "bar", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !12, file: !20, scope: !11, type: !13)
!11 = !DIFile(filename: "b.c", directory: "/tmp/")
!12 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: false, emissionKind: FullDebug, file: !20, enums: !19, retainedTypes: !19)
!13 = !DISubroutineType(types: !14)
!14 = !{!15}
!15 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!18 = !DIFile(filename: "a.c", directory: "/tmp/")
!19 = !{}
!20 = !DIFile(filename: "b.c", directory: "/tmp/")
!21 = !{i32 1, !"Debug Info Version", i32 3}