[llvm-exegesis] Fix error propagation from yaml writing (from serialization)
Investigating https://bugs.llvm.org/show_bug.cgi?id=41448
llvm-svn: 358076
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h
index d75e18b..e54e8c2 100644
--- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h
+++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.h
@@ -79,10 +79,11 @@
static llvm::Expected<std::vector<InstructionBenchmark>>
readYamls(const LLVMState &State, llvm::StringRef Filename);
- void readYamlFrom(const LLVMState &State, llvm::StringRef InputContent);
+ llvm::Error readYamlFrom(const LLVMState &State,
+ llvm::StringRef InputContent);
// Write functions, non-const because of YAML traits.
- void writeYamlTo(const LLVMState &State, llvm::raw_ostream &S);
+ llvm::Error writeYamlTo(const LLVMState &State, llvm::raw_ostream &S);
llvm::Error writeYaml(const LLVMState &State, const llvm::StringRef Filename);
};