diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2016-07-15 00:55:40 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-07-15 00:55:40 +0000 |
commit | f1bc23840ff148c68225bd02c95a56eef4e7a2fc (patch) | |
tree | 069deddb3129982b3ef2646a57644b1060f9b85e /include/clang/Frontend/ASTConsumers.h | |
parent | 543a4302fa7c2926757ecf86f62dd193d66a74e3 (diff) |
Frontend: Simplify ownership model for clang's output streams.
This changes the CompilerInstance::createOutputFile function to return
a std::unique_ptr<llvm::raw_ostream>, rather than an llvm::raw_ostream
implicitly owned by the CompilerInstance. This in most cases required that
I move ownership of the output stream to the relevant ASTConsumer.
The motivation for this change is to allow BackendConsumer to be a client
of interfaces such as D20268 which take ownership of the output stream.
Differential Revision: http://reviews.llvm.org/D21537
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275507 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/ASTConsumers.h')
-rw-r--r-- | include/clang/Frontend/ASTConsumers.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/clang/Frontend/ASTConsumers.h b/include/clang/Frontend/ASTConsumers.h index 757fcae988..b76bfcbe46 100644 --- a/include/clang/Frontend/ASTConsumers.h +++ b/include/clang/Frontend/ASTConsumers.h @@ -31,7 +31,7 @@ class TargetOptions; // original C code. The output is intended to be in a format such that // clang could re-parse the output back into the same AST, but the // implementation is still incomplete. -std::unique_ptr<ASTConsumer> CreateASTPrinter(raw_ostream *OS, +std::unique_ptr<ASTConsumer> CreateASTPrinter(std::unique_ptr<raw_ostream> OS, StringRef FilterString); // AST dumper: dumps the raw AST in human-readable form to stderr; this is |