diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2024-01-11 18:29:01 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-04-06 20:13:39 +0000 |
| commit | 297eecfb02bb25902531dbb5c3b9a88caf8adf29 (patch) | |
| tree | f83ae8ea4aeae9e08a965b28d3355cb3e0475e07 /contrib/llvm-project/lldb/source/Core/Module.cpp | |
| parent | 1db9f3b21e39176dd5b67cf8ac378633b172463e (diff) | |
| parent | 950076cd18f3fa9d789b4add9d405898efff09a5 (diff) | |
Diffstat (limited to 'contrib/llvm-project/lldb/source/Core/Module.cpp')
| -rw-r--r-- | contrib/llvm-project/lldb/source/Core/Module.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/contrib/llvm-project/lldb/source/Core/Module.cpp b/contrib/llvm-project/lldb/source/Core/Module.cpp index c0574b724ace..331cf3246641 100644 --- a/contrib/llvm-project/lldb/source/Core/Module.cpp +++ b/contrib/llvm-project/lldb/source/Core/Module.cpp @@ -855,6 +855,23 @@ void Module::FindFunctions(ConstString name, } } +void Module::FindFunctions(llvm::ArrayRef<CompilerContext> compiler_ctx, + FunctionNameType name_type_mask, + const ModuleFunctionSearchOptions &options, + SymbolContextList &sc_list) { + if (compiler_ctx.empty() || + compiler_ctx.back().kind != CompilerContextKind::Function) + return; + ConstString name = compiler_ctx.back().name; + SymbolContextList unfiltered; + FindFunctions(name, CompilerDeclContext(), name_type_mask, options, + unfiltered); + // Filter by context. + for (auto &sc : unfiltered) + if (sc.function && compiler_ctx.equals(sc.function->GetCompilerContext())) + sc_list.Append(sc); +} + void Module::FindFunctions(const RegularExpression ®ex, const ModuleFunctionSearchOptions &options, SymbolContextList &sc_list) { |
