[PATCH] D127778: [LTO][ELF] Add selective --save-temps= option
Jin Xin Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 29 18:30:08 PDT 2022
Northbadge added inline comments.
================
Comment at: lld/ELF/Driver.cpp:1164
+ // --save-temps implies saving all temps.
+ config->saveTempsArgs.insert("resolution");
+ config->saveTempsArgs.insert("preopt");
----------------
MaskRay wrote:
> Add `static const char *saveTempsValues[] = {...};`
>
> Then append the values in `if (args.hasArg(OPT_save_temps)) {`
>
> Below change `s == "resolution" || s == "preopt" || s == "postpromote"` to `llvm::is_contained(saveTempsValues, ...)`
Thanks! didn't know about those. I changed it to use llvm::find since I needed the static string's address, not sure if there's a better way
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127778/new/
https://reviews.llvm.org/D127778
More information about the llvm-commits
mailing list