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

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 14 14:50:11 PDT 2016


rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.

Yeah, I think this makes sense on balance, even though it does create a weird situation for the `ASTPrinter` case, where we don't really want to transfer ownership of the stream.


================
Comment at: lib/CodeGen/CodeGenAction.cpp:705
@@ -703,3 +704,3 @@
   case Backend_EmitNothing:
-    return nullptr;
+    return {};
   case Backend_EmitMCNull:
----------------
I think `return nullptr;` would be clearer here.

================
Comment at: lib/Frontend/CompilerInstance.cpp:599
@@ -606,3 +598,3 @@
                                                                 << EC.message();
-    return nullptr;
+    return {};
   }
----------------
Likewise.


https://reviews.llvm.org/D21537





More information about the cfe-commits mailing list