[LLDB][Formatters] Re-enable std::function formatter with fixes to improve non-cached...
authorshafik <syaghmour@apple.com>
Tue, 12 Nov 2019 19:23:38 +0000 (11:23 -0800)
committershafik <syaghmour@apple.com>
Tue, 12 Nov 2019 19:30:18 +0000 (11:30 -0800)
commit91e94a7015f14f78809e875c43acbd341d081479
tree262e3237ca8625aee0bfe5b6ea7b21bfb03b94e6
parent7af6025bd12eb086341c3076b760b053a9c2625f
[LLDB][Formatters] Re-enable std::function formatter with fixes to improve non-cached lookup performance

Performance issues lead to the libc++ std::function formatter to be disabled. We addressed some of those performance issues by adding caching see D67111
This PR fixes the first lookup performance by not using FindSymbolsMatchingRegExAndType(...) and instead finding the compilation unit the std::function wrapped callable should be in and then searching for the callable directly in the CU.

Differential Revision: https://reviews.llvm.org/D69913
lldb/include/lldb/Symbol/CompileUnit.h
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py
lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/TestStdFunctionStepIntoCallable.py
lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/main.cpp
lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
lldb/source/Symbol/CompileUnit.cpp