mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
gold plugin: report errors occured in lto_module_create_from_*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139340 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -251,8 +251,13 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
|
|||||||
} else {
|
} else {
|
||||||
M = lto_module_create_from_fd(file->fd, file->name, file->filesize);
|
M = lto_module_create_from_fd(file->fd, file->name, file->filesize);
|
||||||
}
|
}
|
||||||
if (!M)
|
if (!M) {
|
||||||
|
if (const char* msg = lto_get_error_message()) {
|
||||||
|
(*message)(LDPL_ERROR, "Failed to create LTO module: %s", msg);
|
||||||
|
return LDPS_ERR;
|
||||||
|
}
|
||||||
return LDPS_OK;
|
return LDPS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
*claimed = 1;
|
*claimed = 1;
|
||||||
Modules.resize(Modules.size() + 1);
|
Modules.resize(Modules.size() + 1);
|
||||||
|
Reference in New Issue
Block a user