[Lldb-commits] [PATCH] D103107: [lldb] Remove cache in get_demangled_name_without_arguments
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue May 25 11:35:50 PDT 2021
teemperor added inline comments.
================
Comment at: lldb/source/Core/Mangled.cpp:38
-static ConstString
-get_demangled_name_without_arguments(ConstString mangled,
- ConstString demangled) {
- // This pair is <mangled name, demangled name without function arguments>
- static std::pair<ConstString, ConstString>
- g_most_recent_mangled_to_name_sans_args;
-
- // Need to have the mangled & demangled names we're currently examining as
- // statics so we can return a const ref to them at the end of the func if we
- // don't have anything better.
- static ConstString g_last_mangled;
- static ConstString g_last_demangled;
-
- if (mangled && g_most_recent_mangled_to_name_sans_args.first == mangled) {
- return g_most_recent_mangled_to_name_sans_args.second;
- }
-
- g_last_demangled = demangled;
- g_last_mangled = mangled;
-
+static ConstString GetDemangledNameWithoutArguments(ConstString mangled,
+ ConstString demangled) {
----------------
I changed the name to reflect the code style. I'll do the same for the function above as a NFC follow up.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103107/new/
https://reviews.llvm.org/D103107
More information about the lldb-commits
mailing list