[PATCH] D14313: Add a libLTO diagnostic handler that supports lto_get_error_message API
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 6 11:31:53 PST 2015
> I am actually not too satisfied with this patch myself, because I realize that the LTO client can call lto_codegen_set_diagnostic_handler() to set a new diagnostic handler, which however does not seem to change the handleLibLTODiagnostic() method installed by this patch here (the "IRLinker" member of the LTOCodeGenerator class does not provide a method to change its diagnostic handler).
>
Interesting.
Since we give access to the diagnostic handler, could we just
deprecate and eventually remove lto_get_error_message?
As for changing the diagnostic handler. It seems odd to support
changing it in the middle of the link. What I would suggest is
changing IRLinker to a std::unique_ptr that is constructed on first
use and documented that lto_codegen_set_diagnostic_handler cannot be
used once setModule or addModule has been called.
Cheers,
Rafael
More information about the llvm-commits
mailing list