llvm-project/lldb/source
Raphael Isemann d28bc54ff4 [lldb] Remove cache in get_demangled_name_without_arguments
This function has a single-value caching based on function local static variables.

This causes two problems:

* There is no synchronization, so this function randomly returns the demangled
  name of other functions that are demangled at the same time.
* The 1-element cache is not very effective (the cache rate is around 0% when
  running the LLDB test suite that calls this function around 30k times).

I would propose just removing it.

To prevent anyone else the git archeology: the static result variables were
originally added as this returned a ConstString reference, but that has since
been changed so that this returns by value.

Reviewed By: #lldb, JDevlieghere, shafik

Differential Revision: https://reviews.llvm.org/D103107
2021-05-26 18:27:40 +02:00
..
API [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
Breakpoint [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
Commands [lldb][NFC] Remove all uses of StringRef::withNullAsEmpty in LLDB 2021-05-18 09:41:20 +02:00
Core [lldb] Remove cache in get_demangled_name_without_arguments 2021-05-26 18:27:40 +02:00
DataFormatters [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
Expression [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
Host [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
Initialization [lldb] Fix shared library directory computation on windows 2021-02-18 15:37:52 +01:00
Interpreter [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
Plugins [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
Symbol [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
Target [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
Utility [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
CMakeLists.txt Remove HAVE_VCS_VERSION_INC, not needed 2020-10-29 13:09:05 -07:00
lldb.cpp [lldb] Reinstate support for LLDB_VERSION_STRING 2021-02-22 16:56:00 -08:00