This is my first attempt to contribute to llvm. I'm trying to implement this https://bugs.llvm.org/show_bug.cgi?id=33670.
Details
Details
- Reviewers
modocache JDevlieghere hokein - Commits
- rGcf73eba142af: [clang] -foptimization-record-file= should imply -fsave-optimization-record
rL321090: [clang] -foptimization-record-file= should imply -fsave-optimization-record
rC321090: [clang] -foptimization-record-file= should imply -fsave-optimization-record
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Hi! You put "[clangd]" in the title, but I don't believe it's related to clangd but rather just "clang"?
Comment Actions
I think you can achieve the same result with less code by checking for the flag's presence higher up, where currently OPT_fsave_optimization_record is handled (Clang.cpp:4329). Something like:
if (Args.hasFlag(options::OPT_fsave_optimization_record, options::OPT_fno_save_optimization_record, false) || Args.hasFlag(options::OPT_foptimization_record_file_EQ, options::OPT_fno_save_optimization_record, false)) {
The test looks good to me.
Comment Actions
This also ensures that if fno_save_optimization_record is specified, you don't overwrite it by setting the file. This is definitely something you'd want to add to your test case.
Comment Actions
Thanks Dmitry, this LGTM!
PS: Let me know if you don't have commit access and want me to commit it for you.