brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 597df8f Raw
42 lines · plain
1## This checks the number of inlined variables with 0% location2## coverage in split dwarf cases.3##  $ cat test1.cpp4##  __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.cpp15##  __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 -S27##  The split-dwarf.s was handcrafted.28 29REQUIRES: x86_64-linux30RUN: rm -rf %t31RUN: mkdir %t32RUN: cd %t33RUN: llvm-mc -triple x86_64-unknown-linux -filetype=obj %S/Inputs/split-dwarf-objfile1.s -o test1.dwo34RUN: llvm-mc -triple x86_64-unknown-linux -filetype=obj %S/Inputs/split-dwarf-objfile2.s -o test2.dwo35RUN: llvm-mc -triple x86_64-unknown-linux -filetype=obj %S/Inputs/split-dwarf.s -o split-dwarf.o36RUN: llvm-dwarfdump --statistics split-dwarf.o | FileCheck %s37 38CHECK: "#variables processed by location statistics": 239CHECK: "#variables with 0% of parent scope covered by DW_AT_location": 240CHECK: "#local vars processed by location statistics": 241CHECK: "#local vars with 0% of parent scope covered by DW_AT_location": 242