[llvm-commits] [llvm] r139340 - /llvm/trunk/tools/gold/gold-plugin.cpp
Ivan Krasin
krasin at chromium.org
Thu Sep 8 17:14:04 PDT 2011
Author: krasin
Date: Thu Sep 8 19:14:04 2011
New Revision: 139340
URL: http://llvm.org/viewvc/llvm-project?rev=139340&view=rev
Log:
gold plugin: report errors occured in lto_module_create_from_*
Modified:
llvm/trunk/tools/gold/gold-plugin.cpp
Modified: llvm/trunk/tools/gold/gold-plugin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=139340&r1=139339&r2=139340&view=diff
==============================================================================
--- llvm/trunk/tools/gold/gold-plugin.cpp (original)
+++ llvm/trunk/tools/gold/gold-plugin.cpp Thu Sep 8 19:14:04 2011
@@ -251,8 +251,13 @@
} else {
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;
+ }
*claimed = 1;
Modules.resize(Modules.size() + 1);
More information about the llvm-commits
mailing list