From 9acacebf83d393f7d73c1ab8f29a4137755d9782 Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Mon, 13 May 2019 16:48:06 +0000 Subject: [PATCH] [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 --- lldb/source/Target/CPPLanguageRuntime.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lldb/source/Target/CPPLanguageRuntime.cpp b/lldb/source/Target/CPPLanguageRuntime.cpp index 16387e809883..ef1202170052 100644 --- a/lldb/source/Target/CPPLanguageRuntime.cpp +++ b/lldb/source/Target/CPPLanguageRuntime.cpp @@ -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) {