1 ## This test checks that debug info contained in the source file is properly
2 ## verified by --verify after copying. If --no-garbage-collection is
3 ## specified then the verification should fail, otherwise the verification
6 # RUN: yaml2obj %s -o %t.o
8 ## Verify resulting debug info after --garbage-collection optimisation.
9 # RUN: llvm-dwarfutil %t.o %t1 --verify
10 # RUN: llvm-dwarfutil --linker llvm %t.o %t1 --verify
12 ## Verify separate debug file after --garbage-collection optimisation.
13 # RUN: llvm-dwarfutil %t.o --separate-debug-file %t1 --verify
14 # RUN: llvm-dwarfutil --linker llvm %t.o --separate-debug-file %t1 --verify
16 ## Verify not optimised resulting debug info.
17 # RUN: not llvm-dwarfutil --no-garbage-collection %t.o %t1 --verify 2>&1 | FileCheck %s -DFILE=%t1
18 # RUN: not llvm-dwarfutil --linker llvm --no-garbage-collection %t.o %t1 --verify 2>&1 | FileCheck %s -DFILE=%t1
20 ## Verify not optimised resulting separate debug file.
21 # RUN: not llvm-dwarfutil --no-garbage-collection %t.o --separate-debug-file %t1 --verify 2>&1 | FileCheck %s -DFILE=%t1.debug
22 # RUN: not llvm-dwarfutil --linker llvm --no-garbage-collection %t.o --separate-debug-file %t1 --verify 2>&1 | FileCheck %s -DFILE=%t1.debug
24 ## Check that verification is disabled when destination is stdout.
25 # RUN: llvm-dwarfutil %t.o - --verify 2>&1 | FileCheck %s --check-prefix=CHECK-STDOUT
26 # RUN: llvm-dwarfutil --linker llvm %t.o - --verify 2>&1 | FileCheck %s --check-prefix=CHECK-STDOUT
28 # CHECK: error: '[[FILE]]': output verification failed
29 # CHECK-STDOUT: warning: verification skipped because writing to stdout
40 - Tag: DW_TAG_compile_unit
41 Children: DW_CHILDREN_yes
43 - Attribute: DW_AT_producer
45 - Attribute: DW_AT_language
47 - Attribute: DW_AT_name
49 - Attribute: DW_AT_low_pc
51 - Attribute: DW_AT_high_pc
53 - Tag: DW_TAG_subprogram
54 Children: DW_CHILDREN_no
56 - Attribute: DW_AT_name
58 - Attribute: DW_AT_low_pc
60 - Attribute: DW_AT_high_pc
62 - Attribute: DW_AT_type
64 - Tag: DW_TAG_class_type
65 Children: DW_CHILDREN_yes
67 - Attribute: DW_AT_name
70 Children: DW_CHILDREN_no
72 - Attribute: DW_AT_type
74 - Attribute: DW_AT_name
76 - Tag: DW_TAG_class_type
77 Children: DW_CHILDREN_no
79 - Attribute: DW_AT_name
81 - Attribute: DW_AT_declaration
82 Form: DW_FORM_flag_present
83 - Tag: DW_TAG_class_type
84 Children: DW_CHILDREN_yes
86 - Attribute: DW_AT_name
88 - Attribute: DW_AT_declaration
89 Form: DW_FORM_flag_present
90 - Tag: DW_TAG_template_type_parameter
91 Children: DW_CHILDREN_no
93 - Attribute: DW_AT_type
95 - Tag: DW_TAG_base_type
96 Children: DW_CHILDREN_no
98 - Attribute: DW_AT_name