[PATCH] D21537: Frontend: Simplify ownership model for clang's output streams.

Peter Collingbourne via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 20 15:16:44 PDT 2016


pcc created this revision.
pcc added a reviewer: rsmith.
pcc added a subscriber: cfe-commits.

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.

http://reviews.llvm.org/D21537

Files:
  include/clang/CodeGen/BackendUtil.h
  include/clang/CodeGen/ObjectFilePCHContainerOperations.h
  include/clang/Frontend/ASTConsumers.h
  include/clang/Frontend/CompilerInstance.h
  include/clang/Frontend/FrontendActions.h
  include/clang/Frontend/PCHContainerOperations.h
  include/clang/Rewrite/Frontend/ASTConsumers.h
  lib/CodeGen/BackendUtil.cpp
  lib/CodeGen/CodeGenAction.cpp
  lib/CodeGen/ObjectFilePCHContainerOperations.cpp
  lib/Frontend/ASTConsumers.cpp
  lib/Frontend/ASTUnit.cpp
  lib/Frontend/CompilerInstance.cpp
  lib/Frontend/FrontendActions.cpp
  lib/Frontend/PCHContainerOperations.cpp
  lib/Frontend/Rewrite/FrontendActions.cpp
  lib/Frontend/Rewrite/HTMLPrint.cpp
  lib/Frontend/Rewrite/RewriteModernObjC.cpp
  lib/Frontend/Rewrite/RewriteObjC.cpp
  tools/clang-check/ClangCheck.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21537.61312.patch
Type: text/x-patch
Size: 43590 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160620/58653b2e/attachment-0001.bin>


More information about the cfe-commits mailing list