[llvm] [llvm][NFC] Remove a couple unused member functions in `CrashRecoveryContext` (PR #162246)

Victor Chernyakin via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 7 02:11:06 PDT 2025


https://github.com/localspook created https://github.com/llvm/llvm-project/pull/162246

They're not used anywhere, and don't really offer anything beyond the functions they wrap.

>From d358384ce03d4cc9b5cc3c8e5275b24977924c4e Mon Sep 17 00:00:00 2001
From: Victor Chernyakin <chernyakin.victor.j at outlook.com>
Date: Tue, 7 Oct 2025 02:05:44 -0700
Subject: [PATCH] [llvm][NFC] Remove a couple unused member functions in
 `CrashRecoveryContext`

---
 llvm/include/llvm/Support/CrashRecoveryContext.h | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/llvm/include/llvm/Support/CrashRecoveryContext.h b/llvm/include/llvm/Support/CrashRecoveryContext.h
index 773de899acb38..ffee81dd24587 100644
--- a/llvm/include/llvm/Support/CrashRecoveryContext.h
+++ b/llvm/include/llvm/Support/CrashRecoveryContext.h
@@ -80,9 +80,6 @@ class CrashRecoveryContext {
   /// make as little assumptions as possible about the program state when
   /// RunSafely has returned false.
   LLVM_ABI bool RunSafely(function_ref<void()> Fn);
-  bool RunSafely(void (*Fn)(void*), void *UserData) {
-    return RunSafely([&]() { Fn(UserData); });
-  }
 
   /// Execute the provide callback function (with the given arguments) in
   /// a protected context which is run in another thread (optionally with a
@@ -94,10 +91,6 @@ class CrashRecoveryContext {
   /// propagated to the new thread as well.
   LLVM_ABI bool RunSafelyOnThread(function_ref<void()>,
                                   unsigned RequestedStackSize = 0);
-  bool RunSafelyOnThread(void (*Fn)(void*), void *UserData,
-                         unsigned RequestedStackSize = 0) {
-    return RunSafelyOnThread([&]() { Fn(UserData); }, RequestedStackSize);
-  }
 
   LLVM_ABI bool RunSafelyOnNewStack(function_ref<void()>,
                                     unsigned RequestedStackSize = 0);



More information about the llvm-commits mailing list