Skip to content

Commit 4dfcbae

Browse files
committed
Fixup llvm#152322: [Support] Enable CRTP for GraphWriter (NFC)
Because commit 474bbc1 does not make the base class's members protected, this makes it impossible to partially specialize the base class using CRTP.
1 parent 89de991 commit 4dfcbae

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/include/llvm/Support/GraphWriter.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ LLVM_ABI bool DisplayGraph(StringRef Filename, bool wait = true,
6262
GraphProgram::Name program = GraphProgram::DOT);
6363

6464
template <typename GraphType, typename Derived> class GraphWriterBase {
65+
protected:
6566
raw_ostream &O;
6667
const GraphType &G;
6768
bool RenderUsingHTML = false;
@@ -73,6 +74,7 @@ template <typename GraphType, typename Derived> class GraphWriterBase {
7374
using child_iterator = typename GTraits::ChildIteratorType;
7475
DOTTraits DTraits;
7576

77+
private:
7678
static_assert(std::is_pointer_v<NodeRef>,
7779
"FIXME: Currently GraphWriterBase requires the NodeRef type to "
7880
"be a pointer.\nThe pointer usage should be moved to "

0 commit comments

Comments
 (0)