Home | History | Annotate | Download | only in llvm-cov
      1 // Check that we combine expansion regions.
      2 
      3 // RUN: llvm-profdata merge %S/Inputs/combine_expansions.proftext -o %t.profdata
      4 // RUN: llvm-cov show %S/Inputs/combine_expansions.covmapping -instr-profile %t.profdata -path-equivalence=/tmp/ec,%S %s | FileCheck %s
      5 
      6 #define SIMPLE_OP \
      7   ++x
      8 // CHECK:      [[@LINE-2]]|  |#define SIMPLE_OP
      9 // CHECK-NEXT: [[@LINE-2]]| 2|  ++x
     10 
     11 #define DO_SOMETHING \
     12   {                  \
     13     int x = 0;       \
     14     SIMPLE_OP;       \
     15   }
     16 // CHECK:      [[@LINE-5]]|  |#define DO_SOMETHING
     17 // CHECK-NEXT: [[@LINE-5]]| 2|  {
     18 // CHECK-NEXT: [[@LINE-5]]| 2|    int x = 0;
     19 // CHECK-NEXT: [[@LINE-5]]| 2|    SIMPLE_OP;
     20 // CHECK-NEXT: [[@LINE-5]]| 2|  }
     21 
     22 int main() {    // CHECK:      [[@LINE]]| 1|int main() {
     23   DO_SOMETHING; // CHECK-NEXT: [[@LINE]]| 1|  DO_SOMETHING;
     24   DO_SOMETHING; // CHECK-NEXT: [[@LINE]]| 1|  DO_SOMETHING;
     25   return 0;     // CHECK-NEXT: [[@LINE]]| 1|  return 0;
     26 }               // CHECK-NEXT: [[@LINE]]| 1|}
     27