diff options
author | Alex Langford <alangford@apple.com> | 2023-05-04 16:49:30 -0700 |
---|---|---|
committer | Alex Langford <alangford@apple.com> | 2023-05-04 16:49:30 -0700 |
commit | 3d6073a9c33005abf8c6fc074e434c90b36dccb9 (patch) | |
tree | 99bf2ad63bed6384dcc40cbbefeb12e2fe53de4d /lldb/source/Commands/CommandCompletions.cpp | |
parent | 6f8b33f6dfd0a0f8d2522b6c832bd6298ae2f3f3 (diff) | |
download | llvm-3d6073a9c33005abf8c6fc074e434c90b36dccb9.zip llvm-3d6073a9c33005abf8c6fc074e434c90b36dccb9.tar.gz llvm-3d6073a9c33005abf8c6fc074e434c90b36dccb9.tar.bz2 |
Revert "[lldb] Expose a const iterator for SymbolContextList"
This reverts commit 04aa943be8ed5c03092e2a90112ac638360ec253.
This broke the debian buildbot and I'm not sure why. Reverting so I can
investigate.
Diffstat (limited to 'lldb/source/Commands/CommandCompletions.cpp')
-rw-r--r-- | lldb/source/Commands/CommandCompletions.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/lldb/source/Commands/CommandCompletions.cpp b/lldb/source/Commands/CommandCompletions.cpp index f7d8e68..ae1ee1f 100644 --- a/lldb/source/Commands/CommandCompletions.cpp +++ b/lldb/source/Commands/CommandCompletions.cpp @@ -220,15 +220,18 @@ public: function_options.include_inlines = true; context.module_sp->FindFunctions(m_regex, function_options, sc_list); + SymbolContext sc; // Now add the functions & symbols to the list - only add if unique: - for (const SymbolContext &sc : sc_list) { - ConstString func_name = sc.GetFunctionName(Mangled::ePreferDemangled); - // Ensure that the function name matches the regex. This is more than - // a sanity check. It is possible that the demangled function name - // does not start with the prefix, for example when it's in an - // anonymous namespace. - if (!func_name.IsEmpty() && m_regex.Execute(func_name.GetStringRef())) - m_match_set.insert(func_name); + for (uint32_t i = 0; i < sc_list.GetSize(); i++) { + if (sc_list.GetContextAtIndex(i, sc)) { + ConstString func_name = sc.GetFunctionName(Mangled::ePreferDemangled); + // Ensure that the function name matches the regex. This is more than + // a sanity check. It is possible that the demangled function name + // does not start with the prefix, for example when it's in an + // anonymous namespace. + if (!func_name.IsEmpty() && m_regex.Execute(func_name.GetStringRef())) + m_match_set.insert(func_name); + } } } return Searcher::eCallbackReturnContinue; |