[llvm] [llvm-exegesis] Use explicit error classes for different snippet crashes (PR #74210)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 11 19:23:19 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);
----------------
boomanaiden154 wrote:
No. I've readded the preprocessor conditional here for Unix vs non-unix systems.
https://github.com/llvm/llvm-project/pull/74210
More information about the llvm-commits
mailing list