[PATCH] D70287: [LLD][COMMON] Fix Incorrect Stream in LLD ErrorHandler

Erik McClure via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 14 18:53:22 PST 2019


blackhole12 added a comment.

I am calling LLD from within another command line application, and I only want to display output from LLD if there is an actual error, or the user has enabled verbose logging, but several places in LLD use message() during the linking process even if it succeeds, which will output directly to stdout with no way for me to portably redirect it (unless I use `freopen`, which permanently redirects it to a file, forever, and cannot be restored afterwards). If there needs to be a separate stream for non-error messages, then there should be a way to pass that into the `link()` function as well, instead of bypassing everything and outputting directly to stdout.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70287





More information about the llvm-commits mailing list