diff options
author | Rui Ueyama <ruiu@google.com> | 2019-11-15 14:06:57 +0900 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2019-11-18 11:18:06 +0900 |
commit | b11386f9be9b2dc7276a758d64f66833da10bdea (patch) | |
tree | a2b86a5ace890513090fea13c704acf2e149de0e /lldb/packages/Python/lldbsuite/support/gmodules.py | |
parent | 5d67d81f484f935b709918ad99462e32efa3b17a (diff) | |
download | bcm5719-llvm-b11386f9be9b2dc7276a758d64f66833da10bdea.tar.gz bcm5719-llvm-b11386f9be9b2dc7276a758d64f66833da10bdea.zip |
Make it possible to redirect not only errs() but also outs()
This change is for those who use lld as a library. Context:
https://reviews.llvm.org/D70287
This patch adds a new parmeter to lld::*::link() so that we can pass
an raw_ostream object representing stdout. Previously, lld::*::link()
took only an stderr object.
Justification for making stdoutOS and stderrOS mandatory: I wanted to
make link() functions to take stdout and stderr in that order.
However, if we change the function signature from
bool link(ArrayRef<const char *> args, bool canExitEarly,
raw_ostream &stderrOS = llvm::errs());
to
bool link(ArrayRef<const char *> args, bool canExitEarly,
raw_ostream &stdoutOS = llvm::outs(),
raw_ostream &stderrOS = llvm::errs());
, then the meaning of existing code that passes stderrOS silently
changes (stderrOS would be interpreted as stdoutOS). So, I chose to
make existing code not to compile, so that developers can fix their
code.
Differential Revision: https://reviews.llvm.org/D70292
Diffstat (limited to 'lldb/packages/Python/lldbsuite/support/gmodules.py')
0 files changed, 0 insertions, 0 deletions