2015-03-10 02:54:58 +08:00
|
|
|
// RUN: llvm-profdata merge %S/Inputs/regionMarkers.proftext -o %t.profdata
|
2014-08-23 06:56:03 +08:00
|
|
|
|
2017-09-09 02:44:46 +08:00
|
|
|
int main() { // CHECK-NOT: Marker at [[@LINE]]:12
|
2014-08-23 06:56:03 +08:00
|
|
|
int x = 0;
|
|
|
|
|
2017-09-09 02:44:46 +08:00
|
|
|
if (x) { // CHECK-NOT: Marker at [[@LINE]]:10
|
2014-08-23 06:56:03 +08:00
|
|
|
x = 0;
|
2017-09-09 02:44:46 +08:00
|
|
|
} else { // CHECK-NOT: Marker at [[@LINE]]:10
|
2014-08-23 06:56:03 +08:00
|
|
|
x = 1;
|
|
|
|
}
|
2017-10-19 02:52:29 +08:00
|
|
|
// CHECK-NOT: Marker at [[@LINE+2]]:19
|
2015-05-14 06:41:48 +08:00
|
|
|
// CHECK: Marker at [[@LINE+1]]:28 = 111M
|
2017-09-09 02:44:46 +08:00
|
|
|
for (int i = 0; i < 100; ++i) { // CHECK-NOT: Marker at [[@LINE]]:33
|
2014-08-23 06:56:03 +08:00
|
|
|
x = 1;
|
|
|
|
}
|
2017-10-19 02:52:29 +08:00
|
|
|
// CHECK-NOT: Marker at [[@LINE+1]]:16
|
2014-08-23 06:56:03 +08:00
|
|
|
x = x < 10 ? x + 1 : x - 1; // CHECK: Marker at [[@LINE]]:24 = 0
|
|
|
|
x = x > 10 ?
|
2017-09-09 02:44:46 +08:00
|
|
|
x - 1: // CHECK-NOT: Marker at [[@LINE]]:9
|
|
|
|
x + 1; // CHECK-NOT: Marker at [[@LINE]]:9
|
2014-08-23 06:56:03 +08:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2014-08-23 08:47:24 +08:00
|
|
|
|
2017-11-09 10:42:34 +08:00
|
|
|
// RUN: llvm-cov show %S/Inputs/regionMarkers.covmapping -instr-profile %t.profdata -show-regions -dump -path-equivalence=/tmp,%S/ %s 2>&1 | FileCheck %s
|
|
|
|
// RUN: llvm-cov show %S/Inputs/regionMarkers.covmapping -instr-profile %t.profdata -show-regions -format=html -dump -path-equivalence=/tmp,%S %s 2>&1 | FileCheck %s
|