[Lldb-commits] [PATCH] D67111: Adding caching to libc++ std::function formatter for lookups that require scanning symbols
Frederic Riss via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 3 10:53:54 PDT 2019
friss added inline comments.
================
Comment at: packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py:44-46
+ # We are running the lookups twice in some cases because now we are
+ # caching the results for some cases mainly lambdas and callable objects.
+ # We want to validate that subsequent lookups obtain the same result.
----------------
Can we find a better way to test the cache lookups?
Ideally, we'd test that the result actually come from the cache. Maybe we can add some logging to FindSymbolsMatchingRegExAndType and check that it doesn't appear on the second search? Also, to make this look like less of a copy-pasto, I would put the test in a helper function and run that function twice, the second time in a mode that checks that the lookups use the caching.
================
Comment at: source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h:87-89
+ using OperatorStringToCallableInfoMap =
+ std::unordered_map<std::string,
+ CPPLanguageRuntime::LibCppStdFunctionCallableInfo>;
----------------
llvm::StringMap?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67111/new/
https://reviews.llvm.org/D67111
More information about the lldb-commits
mailing list