Home | History | Annotate | Download | only in CoverageMapping
      1 // RUN: %clang_cc1 -fprofile-instr-generate -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name header.cpp %s > %tmapping
      2 // RUN: FileCheck -input-file %tmapping %s --check-prefix=CHECK-FUNC
      3 // RUN: FileCheck -input-file %tmapping %s --check-prefix=CHECK-STATIC-FUNC
      4 // RUN: FileCheck -input-file %tmapping %s --check-prefix=CHECK-STATIC-FUNC2
      5 
      6 #include "Inputs/header1.h"
      7 
      8 int main() {
      9   func(1);
     10   static_func(2);
     11 }
     12 
     13 // CHECK-FUNC: func
     14 // CHECK-FUNC: File 0, 4:25 -> 11:2 = #0
     15 // CHECK-FUNC: File 0, 6:15 -> 8:4 = #1
     16 // CHECK-FUNC: File 0, 8:10 -> 10:4 = (#0 - #1)
     17 
     18 // CHECK-STATIC-FUNC: static_func
     19 // CHECK-STATIC-FUNC: File 0, 12:32 -> 20:2 = #0
     20 // CHECK-STATIC-FUNC: File 0, 14:15 -> 16:4 = #1
     21 // CHECK-STATIC-FUNC: File 0, 16:10 -> 18:4 = (#0 - #1)
     22 
     23 // CHECK-STATIC-FUNC2: static_func2
     24 // CHECK-STATIC-FUNC2: File 0, 21:33 -> 29:2 = 0
     25