summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorMichael Kenzel <michael.kenzel@gmail.com>2024-08-19 21:14:32 +0200
committerGitHub <noreply@github.com>2024-08-19 15:14:32 -0400
commit4c967afcc6f3a109e8a325a0327f869c4bfc57c2 (patch)
treec006ade006b665e5d516695fba57819d2d0cba3b /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parent7597e0930638e0a20ca9bfc193a3d89575ce4469 (diff)
[libc++abi] Remove unnecessary dependency on std::unique_ptr (#73277)
The demangling terminate handler uses a function `demangle()` to perform the demangling. This function returns an `std::unique_ptr`, relying on custom deleter and `const_cast` hacks to deal with the facts that only one branch actually allocates, and that the pointer type needs to be `const char*`. However, the destructor of the returned `std::unique_ptr` will never actually run, because the sole place this function is ever called is right before the terminate handler aborts the program. So all this is unnecessary, and creates a dependency onto `<memory>`. This change removes the `demangle()` function and replaces the call with an immediately invoked lambda expression that simply returns a raw pointer in both cases, which should be fine because the memory can never be freed here anyways.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions