[clang-tools-extra] [llvm] [Support] Remove raw_ostream::tie (PR #97396)

James Henderson via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 2 02:14:37 PDT 2024


jh7370 wrote:

> What was the motivation to keep this in llvm-dwarfdump?

If warnings or errors are printed by llvm-dwarfdump without this, we end up with corrupted output, where stderr and stdout are intermixed in a semi-arbitrary way. It was a while back that I made the original change mind you, so I don't have the concrete example in front of me any more. Looking at discussions in the original reviews on related commits make me think llvm-dwarfdump's --debug-line option was particularly badly affected: I'd be surprised if there aren't tests that start failing (potentially flakily, given that it'll depend on buffer sizes and therefore the amount of data written, which may be platform-specific etc) because of this change.

In practice, I wanted this enabled for all tools however, it just never happened.

>  Is there any other way to achieve the same goal?

Unless the additional check is causing serious issues, I'm not sure this is the right question (and even if it is the right question, I think it's on you as the person proposing to remove the change to provide an alternative - I don't really work on LLVM beyond reviewing these days, so I don't have the time to consider alternatives to work that is currently doing the job well for at least one initial use-case I care about). What I feel the right initial question is, is this check actually making a significant difference to performance in real-world use cases?

https://github.com/llvm/llvm-project/pull/97396


More information about the cfe-commits mailing list