[llvm] 8ee9096 - Monospace font for CFG dot graphs

Artur Pilipenko via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 16 21:06:41 PDT 2023


Author: Marek Sedláček
Date: 2023-08-16T21:06:24-07:00
New Revision: 8ee9096408005365cdee0a013fd36cb7243d1893

URL: https://github.com/llvm/llvm-project/commit/8ee9096408005365cdee0a013fd36cb7243d1893
DIFF: https://github.com/llvm/llvm-project/commit/8ee9096408005365cdee0a013fd36cb7243d1893.diff

LOG: Monospace font for CFG dot graphs

Using monospace font for the IR in the graphs improves readability
over the default sans font.

Differential Revision: https://reviews.llvm.org/D154092

Added: 
    

Modified: 
    llvm/include/llvm/Analysis/CFGPrinter.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Analysis/CFGPrinter.h b/llvm/include/llvm/Analysis/CFGPrinter.h
index 8c4c0c3f182f21..893440908ac5af 100644
--- a/llvm/include/llvm/Analysis/CFGPrinter.h
+++ b/llvm/include/llvm/Analysis/CFGPrinter.h
@@ -308,7 +308,8 @@ struct DOTGraphTraits<DOTFuncInfo *> : public DefaultDOTGraphTraits {
                                 : (getHeatColor(1));
 
     std::string Attrs = "color=\"" + EdgeColor + "ff\", style=filled," +
-                        " fillcolor=\"" + Color + "70\"";
+                        " fillcolor=\"" + Color + "70\"" +
+                        " fontname=\"Courier\"";
     return Attrs;
   }
   bool isNodeHidden(const BasicBlock *Node, const DOTFuncInfo *CFGInfo);


        


More information about the llvm-commits mailing list