[llvm] [BOLT] Add dump-dot-func option for selective function CFG dumping (PR #153007)

Sjoerd Meijer via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 14 02:54:12 PDT 2025


================
@@ -0,0 +1,71 @@
+# Test the --dump-dot-func option with multiple functions 
+# (includes tests for both mangled/unmangled names)
+
+RUN: %clang++ %p/Inputs/multi-func.cpp -o %t.exe -Wl,-q
+
+# Test 1: --dump-dot-func with specific function name (mangled)
+RUN: rm -f *.dot
----------------
sjoerdmeijer wrote:

You're using a lot of linux commands in your tests, like `rm` and `test`. Ideally, we just pattern match the output of the compiler, and not have all these dependencies. So, first, I don't think you need to clean up temp files, so you can omit the `rm`. Second, can we not simply match `BOLT-INFO: dumping CFG` for all of these tests and the -NOT variant for the negative tests?

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


More information about the llvm-commits mailing list