[llvm] a2d353e - [Support] Fix CRTP for GraphWriter (NFC) (#152811)

via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 10 12:41:38 PDT 2025


Author: Naveen Seth Hanig
Date: 2025-08-10T21:41:34+02:00
New Revision: a2d353ea17e14a1fc193ec1cf4a6cd39cd73ee44

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

LOG: [Support] Fix CRTP for GraphWriter (NFC) (#152811)

Commit 474bbc1 forgot to change the members of GraphWriterBase from private 
to protected. 
Because of this, GraphWriter can't be properly partially specialized using CRTP.
This commit corrects that, allowing GraphWriterBase to be partially specialized
using CRTP as intended.

Added: 
    

Modified: 
    llvm/include/llvm/Support/GraphWriter.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Support/GraphWriter.h b/llvm/include/llvm/Support/GraphWriter.h
index af2e5016298e6..a8784edfcf896 100644
--- a/llvm/include/llvm/Support/GraphWriter.h
+++ b/llvm/include/llvm/Support/GraphWriter.h
@@ -62,6 +62,7 @@ LLVM_ABI bool DisplayGraph(StringRef Filename, bool wait = true,
                            GraphProgram::Name program = GraphProgram::DOT);
 
 template <typename GraphType, typename Derived> class GraphWriterBase {
+protected:
   raw_ostream &O;
   const GraphType &G;
   bool RenderUsingHTML = false;


        


More information about the llvm-commits mailing list