MaskRay added a comment.

Sorry, but I think this change should be reverted.

(a) `-fsplit-machine-functions` on an unsupported target now emits a warning 
instead of an error. This diverges from the regular expectation for 
target-specific features.

  % fclang --target=riscv64 -fsplit-machine-functions -c a.c
  warning: -fsplit-machine-functions is not valid for riscv64 [-Wbackend-plugin]

`warn_drv_for_elf_only` is not necessary. We typically just use 
`err_drv_unsupported_opt_for_target`.

(b) the test  needs substantial change (D158231 
<https://reviews.llvm.org/D158231>)

(c) The error reporting should be on the driver side, not in backend. `void 
DiagnosticInfoMachineFunctionSplit::print(DiagnosticPrinter &DP) const` is not 
necessary. 
At the very least, it should not be in the generic `IR/DiagnosticInfo.cpp`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157750

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

Reply via email to