]> granicus.if.org Git - llvm/commitdiff
tools/llvm-xray: Avoid std::errc::protocol_* to appease mingw, like r285261.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 11 Jan 2017 01:06:57 +0000 (01:06 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 11 Jan 2017 01:06:57 +0000 (01:06 +0000)
They are oriented from winsock and mingw doesn't import them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291636 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-xray/xray-converter.cc
tools/llvm-xray/xray-extract.cc
tools/llvm-xray/xray-log-reader.cc

index 914dcd967d7e33d2553cd13109168077e9d486d4..81fdca2d26c953dc63b221992b951294168cba40 100644 (file)
@@ -195,7 +195,7 @@ static CommandRegistration Unused(&Convert, []() -> Error {
     return joinErrors(
         make_error<StringError>(
             Twine("Failed loading input file '") + ConvertInput + "'.",
-            std::make_error_code(std::errc::protocol_error)),
+            std::make_error_code(std::errc::executable_format_error)),
         std::move(Err));
 
   raw_fd_ostream OS(ConvertOutput, EC,
index d7b5bd2b1fead6ca270169dd7e8092a339656ef2..49ecd742113743b42c72b720f709396becaa9668 100644 (file)
@@ -254,7 +254,7 @@ InstrumentationMapExtractor::InstrumentationMapExtractor(std::string Filename,
               make_error<StringError>(
                   Twine("Cannot load YAML instrumentation map from '") +
                       Filename + "'.",
-                  std::make_error_code(std::errc::wrong_protocol_type)),
+                  std::make_error_code(std::errc::executable_format_error)),
               std::move(E));
         });
     break;
index 712aa36d5cbd56208b5eb4e9a2c8a7ca99d6dc16..1dc745fe59af61a0ed157f363e312a1df39700e2 100644 (file)
@@ -123,7 +123,7 @@ Error llvm::xray::NaiveLogLoader(StringRef Data, XRayFileHeader &FileHeader,
     default:
       return make_error<StringError>(
           Twine("Unknown record type '") + Twine(int{Type}) + "'",
-          std::make_error_code(std::errc::protocol_error));
+          std::make_error_code(std::errc::executable_format_error));
     }
     Record.FuncId = RecordExtractor.getSigned(&OffsetPtr, sizeof(int32_t));
     Record.TSC = RecordExtractor.getU64(&OffsetPtr);