| 1 |
## This test checks that debug info contained in the source file |
| 2 |
## is fully copied to the destination file in case --no-garbage-collection |
| 3 |
## is specified. |
| 4 |
|
| 5 |
# RUN: yaml2obj %p/Inputs/common.yaml -o %t.o |
| 6 |
|
| 7 |
## Check that the resulting file contains debug info from source file. |
| 8 |
# RUN: llvm-dwarfutil --no-garbage-collection %t.o %t1 |
| 9 |
# RUN: llvm-dwarfdump -a %t1 | FileCheck %s |
| 10 |
|
| 11 |
## Check that the second copy matches with the first. |
| 12 |
# RUN: llvm-dwarfutil --no-garbage-collection %t1 %t2 |
| 13 |
# RUN: cmp %t1 %t2 |
| 14 |
|
| 15 |
## Check that input file passed through <stdin> is correctly processesed. |
| 16 |
# RUN: llvm-dwarfutil --no-garbage-collection - %t2 < %t1 |
| 17 |
# RUN: cmp %t1 %t2 |
| 18 |
|
| 19 |
# CHECK: .debug_abbrev |
| 20 |
# CHECK: DW_TAG_compile_unit |
| 21 |
# CHECK: .debug_info |
| 22 |
# CHECK: DW_TAG_compile_unit |
| 23 |
# CHECK: DW_AT_producer{{.*}}"by_hand" |
| 24 |
# CHECK: DW_AT_language{{.*}}DW_LANG_C_plus_plus |
| 25 |
# CHECK: DW_AT_name{{.*}}"CU1" |
| 26 |
# CHECK: DW_TAG_class_type |
| 27 |
# CHECK: DW_AT_name{{.*}}"class1" |
| 28 |
# CHECK: DW_TAG_base_type |
| 29 |
# CHECK: DW_AT_name{{.*}}"int" |
| 30 |
# CHECK: DW_AT_name{{.*}}"char" |
| 31 |
# CHECK: DW_AT_name{{.*}}"float" |
| 32 |
# CHECK: DW_TAG_pointer_type |
| 33 |
# CHECK: DW_TAG_variable |
| 34 |
# CHECK: DW_AT_name{{.*}}"var1" |