[llvm] [Offload] Implement `olShutDown` (PR #144055)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 16 06:40:17 PDT 2025
================
@@ -130,6 +131,9 @@ constexpr ol_platform_backend_t pluginNameToBackend(StringRef Name) {
#include "Shared/Targets.def"
void initPlugins() {
+ PlatformList = new PlatformVecT();
+ AllocInfoMap = new AllocInfoMapT();
----------------
jhuber6 wrote:
Yeah that's a common problem with these libraries when you start mixing global initializers. We had to do similar hacks in the plugins. There's nothing stopping you from calling `ptr.release` instead of `delete`. Also, this is basically *the* global shared state as far as I can tell. That should be a single type instead of scattered around and put in random Meyer's singletons.
https://github.com/llvm/llvm-project/pull/144055
More information about the llvm-commits
mailing list