From: NAKAMURA Takumi Date: Thu, 27 Oct 2016 00:34:24 +0000 (+0000) Subject: xray-extract.cc: Quick fix for mingw, to avoid errc::protocol_error. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb87cccbef2ca1ae57f7cbf5b54dd8b44ee72409;p=llvm xray-extract.cc: Quick fix for mingw, to avoid errc::protocol_error. errc::protocol_error is winsock-oriented and mingw doesn't include it. (MS does, though) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285261 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/llvm-xray/xray-extract.cc b/tools/llvm-xray/xray-extract.cc index e40dd3d5968..4fbe5ec3565 100644 --- a/tools/llvm-xray/xray-extract.cc +++ b/tools/llvm-xray/xray-extract.cc @@ -160,7 +160,7 @@ llvm::Error LoadBinaryInstrELF( return make_error( Twine("Encountered unknown sled type ") + "'" + Twine(int32_t{Kind}) + "'.", - std::make_error_code(std::errc::protocol_error)); + std::make_error_code(std::errc::executable_format_error)); } auto AlwaysInstrument = Extractor.getU8(&OffsetPtr); Entry.AlwaysInstrument = AlwaysInstrument != 0; @@ -200,7 +200,7 @@ InstrumentationMapExtractor::InstrumentationMapExtractor(std::string Filename, make_error( Twine("Cannot extract instrumentation map from '") + ExtractInput + "'.", - std::make_error_code(std::errc::protocol_error)), + std::make_error_code(std::errc::executable_format_error)), std::move(E)); }); break;