================ @@ -0,0 +1,44 @@ +// Test that missing-annotations detects branches that are hot, but not annotated + +// test diagnostics are issued when profiling data mis-matches annotations +// RUN: llvm-profdata merge %S/Inputs/missing-annotations-branch.proftext -o %t.profdata +// RUN: %clang_cc1 %s -O2 -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata -verify -mllvm -pgo-missing-annotations -Rpass=missing-annotations + +// Ensure we emit an error when we don't use pgo with tolerance threshold +// RUN: %clang_cc1 %s -O2 -o - -emit-llvm -fdiagnostics-misexpect-tolerance=10 -mllvm -pgo-missing-annotations -debug-info-kind=line-tables-only 2>&1 | FileCheck -check-prefix=NOPGO %s + +// Test -fdiagnostics-misexpect-tolerance= requires pgo profile +// NOPGO: '-fdiagnostics-misexpect-tolerance=' requires profile-guided optimization information ---------------- ellishg wrote:
If there is only one FileCheck, I would prefer to use the default `CHECK` prefix. https://github.com/llvm/llvm-project/pull/96524 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits