[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

llvm-svn: 360599
This commit is contained in:
Shafik Yaghmour 2019-05-13 16:48:06 +00:00
parent 0b13ca2f5e
commit 9acacebf83
1 changed files with 2 additions and 2 deletions

View File

@ -241,8 +241,8 @@ CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(
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) {