[PATCH] D48022: [llvm-exegesis] Fix unhandled error.

Guillaume Chatelet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 11 06:39:01 PDT 2018


gchatelet updated this revision to Diff 150740.
gchatelet added a comment.

Removed LLVM_NODISCARD from InstructionBenchmark IO functions since llvm::Error is already marked as LLVM_NODISCARD.


Repository:
  rL LLVM

https://reviews.llvm.org/D48022

Files:
  tools/llvm-exegesis/lib/BenchmarkResult.h
  tools/llvm-exegesis/llvm-exegesis.cpp


Index: tools/llvm-exegesis/llvm-exegesis.cpp
===================================================================
--- tools/llvm-exegesis/llvm-exegesis.cpp
+++ tools/llvm-exegesis/llvm-exegesis.cpp
@@ -148,7 +148,7 @@
   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();
 }
Index: tools/llvm-exegesis/lib/BenchmarkResult.h
===================================================================
--- tools/llvm-exegesis/lib/BenchmarkResult.h
+++ tools/llvm-exegesis/lib/BenchmarkResult.h
@@ -20,6 +20,7 @@
 #include "llvm/ADT/StringRef.h"
 #include "llvm/MC/MCInst.h"
 #include "llvm/MC/MCInstBuilder.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/Support/YAMLTraits.h"
 #include <limits>
 #include <string>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48022.150740.patch
Type: text/x-patch
Size: 987 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180611/20be855d/attachment.bin>


More information about the llvm-commits mailing list