[all-commits] [llvm/llvm-project] f0b3bd: [lldb] Remove raw access to PluginInstances vector...
David Peixotto via All-commits
all-commits at lists.llvm.org
Mon Mar 31 09:54:08 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f0b3bdd6dfa035653de5ead7b8d0582a8c0c158e
https://github.com/llvm/llvm-project/commit/f0b3bdd6dfa035653de5ead7b8d0582a8c0c158e
Author: David Peixotto <peix at meta.com>
Date: 2025-03-31 (Mon, 31 Mar 2025)
Changed paths:
M lldb/source/Core/PluginManager.cpp
Log Message:
-----------
[lldb] Remove raw access to PluginInstances vector (#132884)
Remove raw access to PluginInstances vector
This commit modifies the PluginInstances class to remove direct access
to the m_instances vector. Instead, we expose a new `GetSnapshot` method
that returns a copy of the current state of the instances vector. All
external iteration over the instances is updated to use the new method.
The motivation for the change is to allow modifying the way we store
instances without having to change all the clients. This is a
preliminary change to allow enabling/disabling of plugins in which case
we want to iterate over only enabled plugins.
We also considered using a custom iterator that wraps the vector
iterator and can skip over disabled instances. That works, but the
iterator code is a bit messy with all template and typedefs to make a
compliant iterator.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list