[llvm] [llvm-exegesis] Use explicit error classes for different snippet crashes (PR #74210)
Clement Courbet via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 11 01:11:01 PST 2023
================
@@ -141,17 +141,10 @@ class InProcessFunctionExecutorImpl : public BenchmarkRunner::FunctionExecutor {
CrashRecoveryContext::Disable();
PS.reset();
if (Crashed) {
- std::string Msg = "snippet crashed while running";
-#ifdef LLVM_ON_UNIX
// See "Exit Status for Commands":
// https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html
constexpr const int kSigOffset = 128;
- if (const char *const SigName = strsignal(CRC.RetCode - kSigOffset)) {
- Msg += ": ";
- Msg += SigName;
- }
-#endif
- return make_error<SnippetCrash>(std::move(Msg));
+ return make_error<SnippetSignal>(CRC.RetCode - kSigOffset);
----------------
legrosbuffle wrote:
Is the signal meaningful on windows ?
https://github.com/llvm/llvm-project/pull/74210
More information about the llvm-commits
mailing list