diff options
Diffstat (limited to 'test/tools/llvm-cov/prevent_false_instantiations.h')
-rw-r--r-- | test/tools/llvm-cov/prevent_false_instantiations.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/tools/llvm-cov/prevent_false_instantiations.h b/test/tools/llvm-cov/prevent_false_instantiations.h new file mode 100644 index 0000000000000..45aaab6a28c30 --- /dev/null +++ b/test/tools/llvm-cov/prevent_false_instantiations.h @@ -0,0 +1,12 @@ +// Checks that function instantiations don't go to a wrong file. + +// INSTANTIATION-NOT: {{_Z5func[1,2]v}} +// NAN-NOT: 0{{[ \t]+}}nan%{{[ \t]+}}0{{[ \t]+}}nan% + +// RUN: llvm-profdata merge %S/Inputs/prevent_false_instantiations.proftext -o %t.profdata +// RUN: llvm-cov show -format text %S/Inputs/prevent_false_instantiations.covmapping -instr-profile %t.profdata -filename-equivalence %s | FileCheck %s -check-prefix=INSTANTIATION +// RUN: llvm-cov report %S/Inputs/prevent_false_instantiations.covmapping -instr-profile %t.profdata | FileCheck %s -check-prefix=NAN + +#define DO_SOMETHING() \ + do { \ + } while (0) |