[PATCH] D153652: [Support] Don't set "all_exe" mode by default for file written by llvm::writeToOutput

Alexey Lapshin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 26 04:05:44 PDT 2023


avl added a comment.

In D153652#4448157 <https://reviews.llvm.org/D153652#4448157>, @hokein wrote:

> Thanks for the comments.
>
> In D153652#4447976 <https://reviews.llvm.org/D153652#4447976>, @jhenderson wrote:
>
>> Is there anything that can be done to use gtest unit tests for this? The two lit tests are useful, but the problem with them is that if they switch to using a different approach to emitting their data, the lit tests won't cover the Support code you're actually changing.
>
> The usages of `llvm::writeOutput` are in the ToolMain.cpp files, I don't see a way to unittest them.

unit test which checks `llvm::writeOutput` may be added to raw_ostream_test.cpp. Let`s this test check the case when "all_exec" is not set. i.e. that after default usage of `llvm::writeOutput` the resulting file does not have "all_exec", which is exact purpose of this patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153652



More information about the cfe-commits mailing list