Skip to content

Commit

Permalink
[DataFormatters] FindLibCppStdFunctionCallableInfo() currently uses F…
Browse files Browse the repository at this point in the history
…indFunctions() 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
  • Loading branch information
shafik committed May 13, 2019
1 parent 0b13ca2 commit 9acaceb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lldb/source/Target/CPPLanguageRuntime.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 9acaceb

Please sign in to comment.