[Lldb-commits] [lldb] r360599 - [DataFormatters] FindLibCppStdFunctionCallableInfo() currently uses FindFunctions() in order to find a lambdas operator()() but using FindSymbolsMatchingRegExAndType() is cheaper and if we also anchor the regex using ^ this adds some additional performance gains.
Shafik Yaghmour via lldb-commits
lldb-commits at lists.llvm.org
Mon May 13 09:48:06 PDT 2019
Author: shafik
Date: Mon May 13 09:48:06 2019
New Revision: 360599
URL: http://llvm.org/viewvc/llvm-project?rev=360599&view=rev
Log:
[DataFormatters] FindLibCppStdFunctionCallableInfo() currently uses FindFunctions() in order to find a lambdas operator()() but using FindSymbolsMatchingRegExAndType() is cheaper and if we also anchor the regex using ^ this adds some additional performance gains.
Differential Revision: https://reviews.llvm.org/D61759
Modified:
lldb/trunk/source/Target/CPPLanguageRuntime.cpp
Modified: lldb/trunk/source/Target/CPPLanguageRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/CPPLanguageRuntime.cpp?rev=360599&r1=360598&r2=360599&view=diff
==============================================================================
--- lldb/trunk/source/Target/CPPLanguageRuntime.cpp (original)
+++ lldb/trunk/source/Target/CPPLanguageRuntime.cpp Mon May 13 09:48:06 2019
@@ -241,8 +241,8 @@ CPPLanguageRuntime::FindLibCppStdFunctio
SymbolContextList scl;
- target.GetImages().FindFunctions(RegularExpression{func_to_match}, true, true,
- true, scl);
+ target.GetImages().FindSymbolsMatchingRegExAndType(
+ RegularExpression{R"(^)" + func_to_match}, eSymbolTypeAny, scl, true);
// Case 1,2 or 3
if (scl.GetSize() >= 1) {
More information about the lldb-commits
mailing list