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

Petr Pavlu via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 29 05:48:03 PST 2016


On 10/02/16 18:37, Duncan P. N. Exon Smith wrote:
>
>> 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.
>

Patch for review: http://reviews.llvm.org/D17715. Apologies for the delay.

Thanks,
Petr



More information about the llvm-commits mailing list