| 1 |
RUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/baseaddr/loc1.x86_64 -f -o - | llvm-dwarfdump --debug-info - | FileCheck %s |
| 2 |
|
| 3 |
RUN: dsymutil --linker parallel -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/baseaddr/loc1.x86_64 -f -o - | llvm-dwarfdump --debug-info - | FileCheck %s |
| 4 |
|
| 5 |
The test was compiled from a single source: |
| 6 |
$ cat loc1.cpp |
| 7 |
int f1(int i, int j) { |
| 8 |
int x = 5; |
| 9 |
int y = 3; |
| 10 |
int r = i + j; |
| 11 |
int undef; |
| 12 |
x = undef; |
| 13 |
y = 4; |
| 14 |
return r; |
| 15 |
} |
| 16 |
__attribute__((nodebug)) void f2() { |
| 17 |
} |
| 18 |
int main() { |
| 19 |
return 0; |
| 20 |
} |
| 21 |
|
| 22 |
CHECK: DW_TAG_compile_unit |
| 23 |
CHECK: DW_TAG_variable |
| 24 |
CHECK: DW_AT_location |
| 25 |
CHECK: [0x0000000100000f94, 0x0000000100000f97): DW_OP_consts +3, DW_OP_stack_value |
| 26 |
CHECK: [0x0000000100000f97, 0x0000000100000f99): DW_OP_consts +4, DW_OP_stack_value |
| 27 |
CHECK: DW_TAG_variable |
| 28 |
CHECK: DW_AT_location |
| 29 |
CHECK: [0x0000000100000f94, 0x0000000100000f97): DW_OP_consts +5, DW_OP_stack_value |
| 30 |
CHECK: DW_TAG_variable |
| 31 |
CHECK: DW_AT_location |
| 32 |
CHECK: [0x0000000100000f97, 0x0000000100000f99): DW_OP_reg0 RAX |