[PATCH] D39834: [clang] -foptimization-record-file= should imply -fsave-optimization-record

Jonas Devlieghere via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 20 07:16:42 PST 2017


JDevlieghere added a comment.

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.


https://reviews.llvm.org/D39834





More information about the cfe-commits mailing list