diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:44:14 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:44:14 +0000 |
commit | 2b6b257f4e5503a7a2675bdb8735693db769f75c (patch) | |
tree | e85e046ae7003fe3bcc8b5454cd0fa3f7407b470 /lib/Frontend/Rewrite/HTMLPrint.cpp | |
parent | b4348ed0b7e90c0831b925fbee00b5f179a99796 (diff) |
Notes
Diffstat (limited to 'lib/Frontend/Rewrite/HTMLPrint.cpp')
-rw-r--r-- | lib/Frontend/Rewrite/HTMLPrint.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/Frontend/Rewrite/HTMLPrint.cpp b/lib/Frontend/Rewrite/HTMLPrint.cpp index 22ccfe6936b7..f5fad346124a 100644 --- a/lib/Frontend/Rewrite/HTMLPrint.cpp +++ b/lib/Frontend/Rewrite/HTMLPrint.cpp @@ -32,14 +32,14 @@ using namespace clang; namespace { class HTMLPrinter : public ASTConsumer { Rewriter R; - raw_ostream *Out; + std::unique_ptr<raw_ostream> Out; Preprocessor &PP; bool SyntaxHighlight, HighlightMacros; public: - HTMLPrinter(raw_ostream *OS, Preprocessor &pp, + HTMLPrinter(std::unique_ptr<raw_ostream> OS, Preprocessor &pp, bool _SyntaxHighlight, bool _HighlightMacros) - : Out(OS), PP(pp), SyntaxHighlight(_SyntaxHighlight), + : Out(std::move(OS)), PP(pp), SyntaxHighlight(_SyntaxHighlight), HighlightMacros(_HighlightMacros) {} void Initialize(ASTContext &context) override; @@ -47,11 +47,10 @@ namespace { }; } -std::unique_ptr<ASTConsumer> clang::CreateHTMLPrinter(raw_ostream *OS, - Preprocessor &PP, - bool SyntaxHighlight, - bool HighlightMacros) { - return llvm::make_unique<HTMLPrinter>(OS, PP, SyntaxHighlight, +std::unique_ptr<ASTConsumer> +clang::CreateHTMLPrinter(std::unique_ptr<raw_ostream> OS, Preprocessor &PP, + bool SyntaxHighlight, bool HighlightMacros) { + return llvm::make_unique<HTMLPrinter>(std::move(OS), PP, SyntaxHighlight, HighlightMacros); } |