From 03a3d29541d8652b30e96eee9fa139c234bb7b60 Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Mon, 30 Sep 2019 13:53:50 +0000 Subject: [llvm-exegesis][NFC] Move BenchmarkFailure to own file. Summary: And rename to exegesis::Failure, as it's used everytwhere. Reviewers: gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68217 llvm-svn: 373209 --- llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp') diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp index 685f31a2b7d..790e253709c 100644 --- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp +++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp @@ -8,6 +8,7 @@ #include "BenchmarkResult.h" #include "BenchmarkRunner.h" +#include "Error.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/ScopeExit.h" #include "llvm/ADT/StringMap.h" @@ -343,7 +344,7 @@ InstructionBenchmark::readYaml(const LLVMState &State, if (Yin.setCurrentDocument()) llvm::yaml::yamlize(Yin, Benchmark, /*unused*/ true, Context); if (!Context.getLastError().empty()) - return llvm::make_error(Context.getLastError()); + return make_error(Context.getLastError()); return Benchmark; } else { return ExpectedMemoryBuffer.takeError(); @@ -364,7 +365,7 @@ InstructionBenchmark::readYamls(const LLVMState &State, if (Yin.error()) return llvm::errorCodeToError(Yin.error()); if (!Context.getLastError().empty()) - return llvm::make_error(Context.getLastError()); + return make_error(Context.getLastError()); Yin.nextDocument(); } return Benchmarks; @@ -381,7 +382,7 @@ llvm::Error InstructionBenchmark::writeYamlTo(const LLVMState &State, Yout.beginDocuments(); llvm::yaml::yamlize(Yout, *this, /*unused*/ true, Context); if (!Context.getLastError().empty()) - return llvm::make_error(Context.getLastError()); + return make_error(Context.getLastError()); Yout.endDocuments(); return Error::success(); } @@ -393,7 +394,7 @@ llvm::Error InstructionBenchmark::readYamlFrom(const LLVMState &State, if (Yin.setCurrentDocument()) llvm::yaml::yamlize(Yin, *this, /*unused*/ true, Context); if (!Context.getLastError().empty()) - return llvm::make_error(Context.getLastError()); + return make_error(Context.getLastError()); return Error::success(); } -- cgit v1.2.3