This is an archive of the discontinued LLVM Phabricator instance.

[LTO] Fix lto_module_create_in_codegen_context return value on error
ClosedPublic

Authored by steven_wu on Oct 26 2022, 8:56 AM.

Details

Summary

According to the documentation, lto_module_create_in_codegen_context
should return NULL on error but currently it is accidentally return
error_code. Since this is a bug fix and it seems to be a one-off bug
that only affects this API, there is no need to bump API version.

rdar://101505192

Diff Detail

Event Timeline

steven_wu created this revision.Oct 26 2022, 8:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 26 2022, 8:56 AM
steven_wu requested review of this revision.Oct 26 2022, 8:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 26 2022, 8:56 AM
pete accepted this revision.Oct 26 2022, 10:59 AM

Matches the other lto methods, which do the same error check. LGTM!

This revision is now accepted and ready to land.Oct 26 2022, 10:59 AM