Skip to content

Commit a05910a

Browse files
[llvm-exegesis] Use ExitOnErr instead of manually logging and exiting
This patch removes an explicit use of dbgs() and exit when logging an error to explicitly use ExitOnErr as this is the canonical way to do this within exegesis.
1 parent 02cadde commit a05910a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/tools/llvm-exegesis/llvm-exegesis.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -423,10 +423,9 @@ static void runBenchmarkConfigurations(
423423
if (Err) {
424424
// Errors from executing the snippets are fine.
425425
// All other errors are a framework issue and should fail.
426-
if (!Err.isA<SnippetExecutionFailure>()) {
427-
llvm::errs() << "llvm-exegesis error: " << toString(std::move(Err));
428-
exit(1);
429-
}
426+
if (!Err.isA<SnippetExecutionFailure>())
427+
ExitOnErr(std::move(Err));
428+
430429
BenchmarkResult.Error = toString(std::move(Err));
431430
}
432431
AllResults.push_back(std::move(BenchmarkResult));

0 commit comments

Comments
 (0)