Migrate TCMalloc to new DebugStackTraceHook API and remove the legacy one.

PiperOrigin-RevId: 949705864
Change-Id: I4ce3e9e79198452042ae3ecfb025e3b15684a679
diff --git a/absl/debugging/internal/examine_stack.cc b/absl/debugging/internal/examine_stack.cc
index 9a47f19..a871b04 100644
--- a/absl/debugging/internal/examine_stack.cc
+++ b/absl/debugging/internal/examine_stack.cc
@@ -143,26 +143,12 @@
   writer(buf, writer_arg);
 }
 
-void DebugStackTraceHookLegacyAdapter(void* const stack[], int depth,
-                                      OutputWriter* writer, void* writer_arg) {
-  debug_stack_trace_hook(stack, depth, /*crash_pc=*/nullptr, writer,
-                         writer_arg);
-}
-
 }  // namespace
 
 void RegisterDebugStackTraceHook(SymbolizeUrlEmitter hook) {
   debug_stack_trace_hook = hook;
 }
 
-SymbolizeUrlEmitterLegacy GetDebugStackTraceHookLegacy() {
-  if (debug_stack_trace_hook == nullptr) {
-    // No prior call to RegisterDebugStackTraceHook.
-    return nullptr;
-  }
-  return &DebugStackTraceHookLegacyAdapter;
-}
-
 SymbolizeUrlEmitter GetDebugStackTraceHook() { return debug_stack_trace_hook; }
 
 // Returns the program counter from signal context, nullptr if
diff --git a/absl/debugging/internal/examine_stack.h b/absl/debugging/internal/examine_stack.h
index eca430f..5fa897d 100644
--- a/absl/debugging/internal/examine_stack.h
+++ b/absl/debugging/internal/examine_stack.h
@@ -33,17 +33,12 @@
 typedef void (*SymbolizeUrlEmitter)(void* const stack[], int depth,
                                     const void* crash_pc, OutputWriter* writer,
                                     void* writer_arg);
-typedef void (*SymbolizeUrlEmitterLegacy)(void* const stack[], int depth,
-                                          OutputWriter* writer,
-                                          void* writer_arg);
 
 // Registration of SymbolizeUrlEmitter for use inside of a signal handler.
 // This is inherently unsafe and must be signal safe code.
 void RegisterDebugStackTraceHook(SymbolizeUrlEmitter hook);
 SymbolizeUrlEmitter GetDebugStackTraceHook();
 
-SymbolizeUrlEmitterLegacy GetDebugStackTraceHookLegacy();
-
 // Returns the program counter from signal context, or nullptr if
 // unknown. `vuc` is a ucontext_t*. We use void* to avoid the use of
 // ucontext_t on non-POSIX systems.