diff options
author | Clement Courbet <courbet@google.com> | 2019-09-30 13:53:50 +0000 |
---|---|---|
committer | Clement Courbet <courbet@google.com> | 2019-09-30 13:53:50 +0000 |
commit | 03a3d29541d8652b30e96eee9fa139c234bb7b60 (patch) | |
tree | d4ebecdf5ce8febf8fff74cc85ef94cc6b6f3561 /llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp | |
parent | 6f23a68a84c0cb25bd3009758f62367fd475ed24 (diff) | |
download | bcm5719-llvm-03a3d29541d8652b30e96eee9fa139c234bb7b60.tar.gz bcm5719-llvm-03a3d29541d8652b30e96eee9fa139c234bb7b60.zip |
[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
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp')
-rw-r--r-- | llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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<BenchmarkFailure>(Context.getLastError()); + return make_error<Failure>(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<BenchmarkFailure>(Context.getLastError()); + return make_error<Failure>(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<BenchmarkFailure>(Context.getLastError()); + return make_error<Failure>(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<BenchmarkFailure>(Context.getLastError()); + return make_error<Failure>(Context.getLastError()); return Error::success(); } |