[clang] [Coverage] Support -fprofile-list for cold function coverage (PR #136333)

Lei Wang via cfe-commits cfe-commits at lists.llvm.org
Wed May 7 15:59:25 PDT 2025


================
@@ -9,6 +9,9 @@
 // RUN: echo -e "[clang]\nfun:test1\n[llvm]\nfun:test2" > %t-section.list
 // RUN: %clang_cc1 -fprofile-instrument=llvm -fprofile-list=%t-section.list -emit-llvm %s -o - | FileCheck %s --check-prefix=SECTION
 
+// RUN: echo -e "[coldcov]\nfun:test*\n!fun:test2" > %t-cold-func.list
+// RUN: %clang_cc1 -fprofile-instrument=coldcov -fprofile-list=%t-cold-func.list -emit-llvm %s -o - | FileCheck %s --check-prefix=COLDCOV
+
----------------
wlei-llvm wrote:

improved the test with `split-file`, thanks!

https://github.com/llvm/llvm-project/pull/136333


More information about the cfe-commits mailing list