brintos

brintos / llvm-project-archived public Read only

0
0
Text · 652 B · 499ef01 Raw
27 lines · cpp
1// RUN: %clang_profgen -x c++ -fno-exceptions  -std=c++11 -fuse-ld=gold -fcoverage-mapping -o %t %s2// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t3// RUN: llvm-profdata merge -o %t.profdata %t.profraw4// RUN: llvm-cov show %t -instr-profile %t.profdata 2>&1 | FileCheck %s5 6int g = 100;7struct Base {8  int B;9  Base(int B_) : B(B_) {}10  ~Base() { g -= B; }11};12 13struct Derived : public Base {14  Derived(int K) : Base(K) {}15  ~Derived() = default; // CHECK:  [[@LINE]]| 2|  ~Derived() = default;16};17 18int main() {19  {20    Derived dd(10);21    Derived dd2(90);22  }23  if (g != 0)24    return 1;          // CHECK:  [[@LINE]]|  0|   return 1;25  return 0;26}27