shafik created this revision.
shafik added reviewers: friss, jingham, jasonmolenda.

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.


https://reviews.llvm.org/D61759

Files:
  source/Target/CPPLanguageRuntime.cpp


Index: source/Target/CPPLanguageRuntime.cpp
===================================================================
--- source/Target/CPPLanguageRuntime.cpp
+++ source/Target/CPPLanguageRuntime.cpp
@@ -241,8 +241,8 @@
 
   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) {


Index: source/Target/CPPLanguageRuntime.cpp
===================================================================
--- source/Target/CPPLanguageRuntime.cpp
+++ source/Target/CPPLanguageRuntime.cpp
@@ -241,8 +241,8 @@
 
   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) {
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to