| 1 |
## This checks the number of inlined variables with 0% location |
| 2 |
## coverage in split dwarf cases. |
| 3 |
## $ cat test1.cpp |
| 4 |
## __attribute__((optnone)) static void x() { |
| 5 |
## } |
| 6 |
## __attribute__((always_inline)) static void y() { |
| 7 |
## int var; |
| 8 |
## x(); |
| 9 |
## } |
| 10 |
## void f1() { |
| 11 |
## y(); |
| 12 |
## } |
| 13 |
## |
| 14 |
## $ cat test2.cpp |
| 15 |
## __attribute__((optnone)) static void x() { |
| 16 |
## } |
| 17 |
## __attribute__((always_inline)) static void y() { |
| 18 |
## int var; |
| 19 |
## x(); |
| 20 |
## } |
| 21 |
## void f1(); |
| 22 |
## int main() { |
| 23 |
## f1(); |
| 24 |
## y(); |
| 25 |
## } |
| 26 |
## $ clang++ -O1 -g -gsplit-dwarf test2.cpp test1.cpp -S |
| 27 |
## The split-dwarf.s was handcrafted. |
| 28 |
|
| 29 |
REQUIRES: x86_64-linux |
| 30 |
RUN: rm -rf %t |
| 31 |
RUN: mkdir %t |
| 32 |
RUN: cd %t |
| 33 |
RUN: llvm-mc -triple x86_64-unknown-linux -filetype=obj %S/Inputs/split-dwarf-objfile1.s -o test1.dwo |
| 34 |
RUN: llvm-mc -triple x86_64-unknown-linux -filetype=obj %S/Inputs/split-dwarf-objfile2.s -o test2.dwo |
| 35 |
RUN: llvm-mc -triple x86_64-unknown-linux -filetype=obj %S/Inputs/split-dwarf.s -o split-dwarf.o |
| 36 |
RUN: llvm-dwarfdump --statistics split-dwarf.o | FileCheck %s |
| 37 |
|
| 38 |
CHECK: "#variables processed by location statistics": 2 |
| 39 |
CHECK: "#variables with 0% of parent scope covered by DW_AT_location": 2 |
| 40 |
CHECK: "#local vars processed by location statistics": 2 |
| 41 |
CHECK: "#local vars with 0% of parent scope covered by DW_AT_location": 2 |