mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 16:31:16 +00:00
e62541e6d6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216310 91177308-0d34-0410-b5e6-96231b3b80d8
49 lines
1.5 KiB
C++
49 lines
1.5 KiB
C++
// RUN: llvm-cov show %S/Inputs/highlightedRanges.covmapping -instr-profile %S/Inputs/highlightedRanges.profdata -dump -filename-equivalence %s | FileCheck %s
|
|
|
|
void func() {
|
|
return;
|
|
int i = 0; // CHECK: Highlighted line [[@LINE]], 3 -> 12
|
|
}
|
|
|
|
void func2(int x) {
|
|
if(x > 5) {
|
|
while(x >= 9) {
|
|
return;
|
|
--x; // CHECK: Highlighted line [[@LINE]], 7 -> 10
|
|
}
|
|
int i = 0; // CHECK: Highlighted line [[@LINE]], 5 -> 14
|
|
}
|
|
}
|
|
|
|
void test() {
|
|
int x = 0;
|
|
|
|
if (x) { // CHECK: Highlighted line [[@LINE]], 10 -> ?
|
|
x = 0; // CHECK: Highlighted line [[@LINE]], 1 -> ?
|
|
} else { // CHECK: Highlighted line [[@LINE]], 1 -> 4
|
|
x = 1;
|
|
}
|
|
|
|
// CHECK: Highlighted line [[@LINE+1]], 26 -> 29
|
|
for (int i = 0; i < 0; ++i) { // CHECK: Highlighted line [[@LINE]], 31 -> ?
|
|
x = 1; // CHECK: Highlighted line [[@LINE]], 1 -> ?
|
|
} // CHECK: Highlighted line [[@LINE]], 1 -> 4
|
|
|
|
x = x < 10 ? x +
|
|
1
|
|
: x - 1; // CHECK: Highlighted line [[@LINE]], 16 -> 21
|
|
x = x > 10 ? x + // CHECK: Highlighted line [[@LINE]], 16 -> ?
|
|
1 // CHECK: Highlighted line [[@LINE]], 1 -> 17
|
|
: x - 1;
|
|
}
|
|
|
|
int main() {
|
|
test();
|
|
func();
|
|
func2(9);
|
|
return 0;
|
|
}
|
|
|
|
// llvm-cov doesn't work on big endian yet
|
|
// XFAIL: powerpc64-, s390x, mips-, mips64-, sparc
|