From 6c20abcd5625af907434441af2abcf626ab4c18b Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 11 Jan 2024 19:29:01 +0100 Subject: Merge llvm-project main llvmorg-18-init-16864-g3b3ee1f53424 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-18-init-16864-g3b3ee1f53424. PR: 276104 MFC after: 1 month (cherry picked from commit 297eecfb02bb25902531dbb5c3b9a88caf8adf29) --- contrib/llvm-project/lldb/source/Core/Module.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'contrib/llvm-project/lldb/source/Core/Module.cpp') 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 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) { -- cgit v1.2.3