]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/commit
[LTO] Add a hook to map LLVM diagnostics into the clients of LTO.
authorQuentin Colombet <qcolombet@apple.com>
Wed, 15 Jan 2014 22:04:35 +0000 (22:04 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Wed, 15 Jan 2014 22:04:35 +0000 (22:04 +0000)
commit4c831d97bf065ae5d0fcba80b28e8396dfda7f39
tree43d141a6a13492c3bd165514539826d1c2e60a14
parent7fa843cfef65449f559049044762c680a857e537
[LTO] Add a hook to map LLVM diagnostics into the clients of LTO.

Add a hook in the C API of LTO so that clients of the code generator can set
their own handler for the LLVM diagnostics.
The handler is defined like this:
typedef void (*lto_diagnostic_handler_t)(lto_codegen_diagnostic_severity_t
severity, const char *diag, void *ctxt)
- severity says how bad this is.
- diag is a string that contains the diagnostic message.
- ctxt is the registered context for this handler.

This hook is more general than the lto_get_error_message, since this function
keeps only the latest message and can only be queried when something went wrong
(no warning for instance).

<rdar://problem/15517596>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199338 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm-c/lto.h
include/llvm/LTO/LTOCodeGenerator.h
lib/LTO/LTOCodeGenerator.cpp
tools/lto/lto.cpp
tools/lto/lto.exports