OSDN Git Service

[llvm-exegesis] Fix unhandled error.
authorGuillaume Chatelet <gchatelet@google.com>
Mon, 11 Jun 2018 14:10:10 +0000 (14:10 +0000)
committerGuillaume Chatelet <gchatelet@google.com>
Mon, 11 Jun 2018 14:10:10 +0000 (14:10 +0000)
Summary: Fixing an unhandled error when calling writeYaml.

Reviewers: courbet

Subscribers: tschuett, llvm-commits

Differential Revision: https://reviews.llvm.org/D48022

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

tools/llvm-exegesis/llvm-exegesis.cpp

index 4a3fe35..687469d 100644 (file)
@@ -148,7 +148,7 @@ void benchmarkMain() {
   std::vector<InstructionBenchmark> Results = ExitOnErr(Runner->run(
       GetOpcodeOrDie(State.getInstrInfo()), Filter, NumRepetitions));
   for (InstructionBenchmark &Result : Results)
-    Result.writeYaml(Context, BenchmarkFile);
+    ExitOnErr(Result.writeYaml(Context, BenchmarkFile));
 
   exegesis::pfm::pfmTerminate();
 }