aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/Rewrite/HTMLPrint.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-07-17 20:40:36 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-07-17 20:40:36 +0000
commita51666a4d624a745df90e1c84777fb7a644ff80b (patch)
tree27a6715358a552387f3e0fd041de88a3095d0a35 /clang/lib/Frontend/Rewrite/HTMLPrint.cpp
parentfa59e620126114e35477299dbb726c4e85195276 (diff)
downloadllvm-a51666a4d624a745df90e1c84777fb7a644ff80b.zip
llvm-a51666a4d624a745df90e1c84777fb7a644ff80b.tar.gz
llvm-a51666a4d624a745df90e1c84777fb7a644ff80b.tar.bz2
unique_ptr-ify ownership of ASTConsumers
(after fixing a bug in MultiplexConsumer I noticed the ownership of the nested consumers was implemented with raw pointers - so this fixes that... and follows the source back to its origin pushing unique_ptr ownership up through there too) llvm-svn: 213307
Diffstat (limited to 'clang/lib/Frontend/Rewrite/HTMLPrint.cpp')
-rw-r--r--clang/lib/Frontend/Rewrite/HTMLPrint.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/Frontend/Rewrite/HTMLPrint.cpp b/clang/lib/Frontend/Rewrite/HTMLPrint.cpp
index 64da05f..22ccfe69 100644
--- a/clang/lib/Frontend/Rewrite/HTMLPrint.cpp
+++ b/clang/lib/Frontend/Rewrite/HTMLPrint.cpp
@@ -47,11 +47,12 @@ namespace {
};
}
-ASTConsumer* clang::CreateHTMLPrinter(raw_ostream *OS,
- Preprocessor &PP,
- bool SyntaxHighlight,
- bool HighlightMacros) {
- return new HTMLPrinter(OS, PP, SyntaxHighlight, HighlightMacros);
+std::unique_ptr<ASTConsumer> clang::CreateHTMLPrinter(raw_ostream *OS,
+ Preprocessor &PP,
+ bool SyntaxHighlight,
+ bool HighlightMacros) {
+ return llvm::make_unique<HTMLPrinter>(OS, PP, SyntaxHighlight,
+ HighlightMacros);
}
void HTMLPrinter::Initialize(ASTContext &context) {