blob: db5786b9892b84ef40929e7af35dbe083141b2cd [file] [log] [blame]
Justin Bogner3d7260e2014-09-11 23:20:48 +00001// RUN: llvm-cov show %S/Inputs/showExpansions.covmapping -instr-profile %S/Inputs/showExpansions.profdata -dump -show-expansions -filename-equivalence %s | FileCheck %s
2
3#define DO_SOMETHING_ELSE() \
4 do { \
5 } while (0)
6#define ANOTHER_THING() \
7 do { \
8 if (0) { \
9 } \
10 } while (0)
11
12#define DO_SOMETHING(x) \
13 do { \
14 if (x) \
15 DO_SOMETHING_ELSE(); \
16 else \
17 ANOTHER_THING(); \
18 } while (0)
19
20int main(int argc, const char *argv[]) {
21 for (int i = 0; i < 100; ++i)
22 DO_SOMETHING(i);
23 return 0;
24}
25
26// CHECK: Expansion of {{[0-9]+}}:13 -> 18 @ {{[0-9]+}}, 22:5
27// CHECK: Expansion of {{[0-9]+}}:4 -> 5 @ {{[0-9]+}}, 15:7
28// CHECK: Expansion of {{[0-9]+}}:7 -> 10 @ {{[0-9]+}}, 17:7
29
30// llvm-cov doesn't work on big endian yet
31// XFAIL: powerpc64-, s390x, mips-, mips64-, sparc