[PATCH] D155452: [Flang] Add support for fsave-optimization-record
victorkingi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 18 08:51:01 PDT 2023
victorkingi marked 4 inline comments as done.
victorkingi added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Flang.cpp:398
+ if (const Arg *A = Args.getLastArg(options::OPT_fsave_optimization_record_EQ))
+ Format = A->getValue();
+
----------------
tblah wrote:
> What happens if an invalid or unsupported format is specified. Is that caught somewhere and a good error message printed, or does something crash?
It has the same behavior as clang, producing the error "unknown remark serializer format"
================
Comment at: flang/lib/Frontend/FrontendActions.cpp:961-965
+ clang::DiagnosticsEngine &diags = ci.getDiagnostics();
+ const CodeGenOptions &codeGenOpts = ci.getInvocation().getCodeGenOpts();
+ Fortran::lower::LoweringOptions &loweringOpts =
+ ci.getInvocation().getLoweringOpts();
+
----------------
Thought this refactoring might help making the function clearer. Let me know if its unnecessary
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155452/new/
https://reviews.llvm.org/D155452
More information about the cfe-commits
mailing list