[PATCH] D70292: Make it possible to redirect not only errs() but also outs()

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 15 00:46:04 PST 2019


MaskRay accepted this revision.
MaskRay added a comment.

The description should probably mention that this change is for people who use lld as a library (D70287 <https://reviews.llvm.org/D70287>). They call `lld::*::link`, instead of lld's `main()`.



================
Comment at: lld/lib/Driver/DarwinLdDriver.cpp:1147
 bool link(llvm::ArrayRef<const char *> args, bool CanExitEarly,
-          raw_ostream &Error) {
+          raw_ostream &StdoutOS, raw_ostream &StderrOS) {
   errorHandler().logName = args::getFilenameWithoutExe(args[0]);
----------------
I think we can just use `stdoutOS` and `stderrOS`, there is no need for consistency with local variable names. Note that `args` is also not capitalized...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70292/new/

https://reviews.llvm.org/D70292





More information about the llvm-commits mailing list