tblah 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();
+
----------------
What happens if an invalid or unsupported format is specified. Is that caught 
somewhere and a good error message printed, or does something crash?


================
Comment at: flang/lib/Frontend/FrontendActions.cpp:1018
+  if (llvm::Error E = RemarksFileOrErr.takeError()) {
+    llvm::errs() << toString(std::move(E)) << '\n';
+    return;
----------------
The other error checking in this function outputs using the DiagnosticsEngine. 
This ensures that the errors always have the correct format.

See `reportOptRecordError` in `clang/lib/CodeGen/CodeGenAction.cpp`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155452/new/

https://reviews.llvm.org/D155452

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to