Index: tools/gold/gold-plugin.cpp =================================================================== --- tools/gold/gold-plugin.cpp +++ tools/gold/gold-plugin.cpp @@ -444,11 +444,12 @@ DiagnosticPrinterRawOStream DP(OS); DI.print(DP); } - ld_plugin_level Level; + ld_plugin_level Level = LDPL_FATAL; switch (DI.getSeverity()) { case DS_Error: - message(LDPL_FATAL, "LLVM gold plugin has failed to create LTO module: %s", + message(Level, "LLVM gold plugin has failed to create LTO module: %s", ErrStorage.c_str()); + break; case DS_Warning: Level = LDPL_WARNING; break;