[PATCH] D144981: [Driver] Allow to collect `-save-stats` data to a file specified in the environment variable.
Volodymyr Sapsai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 1 13:31:42 PST 2023
vsapsai planned changes to this revision.
vsapsai added inline comments.
================
Comment at: clang/lib/Frontend/CompilerInstance.cpp:1093
+ StatsFile, EC,
+ llvm::sys::fs::OF_Append | llvm::sys::fs::OF_TextWithCRLF);
if (EC) {
----------------
ahatanak wrote:
> `OF_Append` is necessary when the results are written to a single file specified via `CC_PRINT_INTERNAL_STAT_FILE`, but do we want this change for users passing `-save-stats` to the command line?
For implicit modules appending seems to be correct and desirable as we store information about all CompilerInstance and not only for the last one. But as `llvm-test-suite` https://github.com/llvm/llvm-test-suite/blob/main/litsupport/modules/stats.py doesn't expect appended stats, I'll look into doing it only for environment-driven stats collection.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144981/new/
https://reviews.llvm.org/D144981
More information about the cfe-commits
mailing list