From: Hans Wennborg Date: Thu, 12 Jan 2017 18:33:14 +0000 (+0000) Subject: Avoid std::errc::protocol_* to appease mingw X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fa3329aff599fd147c3e17e47b01fe7844142f22;p=llvm Avoid std::errc::protocol_* to appease mingw Like r291636 and r285261. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291786 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/XRay/Trace.cpp b/lib/XRay/Trace.cpp index c8d95660431..51000c777de 100644 --- a/lib/XRay/Trace.cpp +++ b/lib/XRay/Trace.cpp @@ -144,7 +144,7 @@ Expected llvm::xray::loadTraceFile(StringRef Filename, bool Sort) { if (FileSize < 4) { return make_error( Twine("File '") + Filename + "' too small for XRay.", - std::make_error_code(std::errc::protocol_error)); + std::make_error_code(std::errc::executable_format_error)); } // Attempt to mmap the file. diff --git a/tools/llvm-xray/xray-account.cc b/tools/llvm-xray/xray-account.cc index 747b4d18000..84a7da2470a 100644 --- a/tools/llvm-xray/xray-account.cc +++ b/tools/llvm-xray/xray-account.cc @@ -477,7 +477,7 @@ static CommandRegistration Unused(&Account, []() -> Error { return joinErrors( make_error( Twine("Failed loading input file '") + AccountInput + "'", - std::make_error_code(std::errc::protocol_error)), + std::make_error_code(std::errc::executable_format_error)), TraceOrErr.takeError()); } diff --git a/tools/llvm-xray/xray-converter.cc b/tools/llvm-xray/xray-converter.cc index 7dfc8374c28..31275e2902f 100644 --- a/tools/llvm-xray/xray-converter.cc +++ b/tools/llvm-xray/xray-converter.cc @@ -192,7 +192,7 @@ static CommandRegistration Unused(&Convert, []() -> Error { return joinErrors( make_error( Twine("Failed loading input file '") + ConvertInput + "'.", - std::make_error_code(std::errc::protocol_error)), + std::make_error_code(std::errc::executable_format_error)), TraceOrErr.takeError()); } return Error::success();