diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-08-10 19:56:59 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-08-10 19:56:59 +0000 |
commit | 680c4c898c3ec1b10be6833e1dfad533724c4d20 (patch) | |
tree | c624345afa1a1fadd0b38af44456d9584bae31bb /clang-tools-extra/modularize | |
parent | 6beb6aa8f0f6fa20e8c8de7a17f39b101ed0da59 (diff) | |
download | bcm5719-llvm-680c4c898c3ec1b10be6833e1dfad533724c4d20.tar.gz bcm5719-llvm-680c4c898c3ec1b10be6833e1dfad533724c4d20.zip |
Recommit 213308: unique_ptr-ify ownership of ASTConsumers (reverted in r213324)
After post-commit review and community discussion, this seems like a
reasonable direction to continue, making ownership semantics explicit in
the source using the type system.
llvm-svn: 215324
Diffstat (limited to 'clang-tools-extra/modularize')
-rw-r--r-- | clang-tools-extra/modularize/Modularize.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang-tools-extra/modularize/Modularize.cpp b/clang-tools-extra/modularize/Modularize.cpp index c95126f9677..83c5547a916 100644 --- a/clang-tools-extra/modularize/Modularize.cpp +++ b/clang-tools-extra/modularize/Modularize.cpp @@ -652,10 +652,10 @@ public: HadErrors(HadErrors) {} protected: - virtual clang::ASTConsumer *CreateASTConsumer(CompilerInstance &CI, - StringRef InFile) { - return new CollectEntitiesConsumer(Entities, PPTracker, - CI.getPreprocessor(), InFile, HadErrors); + std::unique_ptr<clang::ASTConsumer> + CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override { + return llvm::make_unique<CollectEntitiesConsumer>( + Entities, PPTracker, CI.getPreprocessor(), InFile, HadErrors); } private: |