diff --git a/llvm/include/llvm/Support/ScopedPrinter.h b/llvm/include/llvm/Support/ScopedPrinter.h index 419ab97366796..506b40a09ed78 100644 --- a/llvm/include/llvm/Support/ScopedPrinter.h +++ b/llvm/include/llvm/Support/ScopedPrinter.h @@ -539,7 +539,13 @@ ScopedPrinter::printHex(StringRef Label, startLine() << Label << ": " << hex(Value) << "\n"; } -struct DelimitedScope; +struct DelimitedScope { + DelimitedScope(ScopedPrinter &W) : W(&W) {} + DelimitedScope() : W(nullptr) {} + virtual ~DelimitedScope() = default; + virtual void setPrinter(ScopedPrinter &W) = 0; + ScopedPrinter *W; +}; class JSONScopedPrinter : public ScopedPrinter { private: @@ -838,14 +844,6 @@ class JSONScopedPrinter : public ScopedPrinter { } }; -struct DelimitedScope { - DelimitedScope(ScopedPrinter &W) : W(&W) {} - DelimitedScope() : W(nullptr) {} - virtual ~DelimitedScope() = default; - virtual void setPrinter(ScopedPrinter &W) = 0; - ScopedPrinter *W; -}; - struct DictScope : DelimitedScope { explicit DictScope() = default; explicit DictScope(ScopedPrinter &W) : DelimitedScope(W) { W.objectBegin(); }