[llvm] [CFGPrinter] Allow CFG dumps with a given filename (PR #112906)

Lewis Crawford via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 4 09:19:00 PST 2024


================
@@ -942,9 +942,14 @@ class LLVM_ABI Function : public GlobalObject, public ilist_node<Function> {
   ///
   void viewCFG() const;
 
+  /// viewCFG - This function is meant for use from the debugger. It works just
+  /// like viewCFG(), but generates the dot file with the given filename.
+  void viewCFG(const char *Name) const;
+
   /// Extended form to print edge weights.
   void viewCFG(bool ViewCFGOnly, const BlockFrequencyInfo *BFI,
-               const BranchProbabilityInfo *BPI) const;
+               const BranchProbabilityInfo *BPI,
+               const char *Name = nullptr) const;
----------------
LewisCrawford wrote:

Thanks for the review!
I've changed it to OutputFileName now.

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


More information about the llvm-commits mailing list