aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorDavid Peixotto <peix@meta.com>2025-04-02 13:15:31 -0700
committerGitHub <noreply@github.com>2025-04-02 13:15:31 -0700
commit2026873fb8a1f654aa920cd5ea8074e55053973b (patch)
tree13d553b5c43ba56a867f8cef22b4c5560b44a81a /clang/lib/CodeGen/CodeGenModule.cpp
parentc59d3a268444b14c2db0fdea7e4bd929bb30630b (diff)
downloadllvm-2026873fb8a1f654aa920cd5ea8074e55053973b.zip
llvm-2026873fb8a1f654aa920cd5ea8074e55053973b.tar.gz
llvm-2026873fb8a1f654aa920cd5ea8074e55053973b.tar.bz2
Add enable/disable api for SystemRuntime plugins (#133794)
This commit adds support for enabling and disabling plugins by name. The changes are made generically in the `PluginInstances` class, but currently we only expose the ability to SystemRuntime plugins. Other plugins types can be added easily. We had a few design goals for how disabled plugins should work 1. Plugins that are disabled should still be visible to the system. This allows us to dynamically enable and disable plugins and report their state to the user. 2. Plugin order should be stable across disable and enable changes. We want avoid changing the order of plugin lookup. When a plugin is re-enabled it should return to its original slot in the creation order. 3. Disabled plugins should not appear in PluginManager operations. Clients should be able to assume that only enabled plugins will be returned from the PluginManager. For the implementation we modify the plugin instance to maintain a bool of its enabled state. Existing clients external to the Instances class expect to iterate over only enabled instance so we skip over disabed instances in the query and snapshot apis. This way the client does not have to manually check which instances are enabled.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions