[llvm] r258298 - [LTO] Fix error reporting when a file passed to libLTO is invalid or non-existent

Duncan P. N. Exon Smith via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 10 10:37:11 PST 2016


> On 2016-Feb-10, at 10:35, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
> 
>> One possible fix could be to create a temporary LLVMContext in
>> lto_module_create_in_local_context(), set its diagnostics handler in the
>> same
>> way LTOContext is set up and then call createInContext() giving it this
>> context. I can look if such a solution is feasible in a few days. As
>> explained
>> above, I think that reverting the patch would only hide the underlying
>> problem.
> 
> I like it. With it the C++ API would always take an existing context.

This makes sense to me too.


More information about the llvm-commits mailing list