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 #include 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 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(); }