mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-09 01:29:52 +00:00
[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:
parent
0b13ca2f5e
commit
9acacebf83
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user