[PATCH] D33515: Fix the ManagedStatic list ordering when using DynamicLibrary::addPermanentLibrary.

Frederich Munch via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 07:44:28 PDT 2017


marsupial added a comment.

**addGlobalExtension** is documented to be used by plugins, where you are using it for a statically linked lib.
There doesn't seem to be any great solution and I going back to how it was (leaking) is one of the worse options.

All I can see is:

1. Add an argument to RegisterStandardPasses that will choose a call to **addGlobalExtension** or **addExtension**.
2. Make **RegisterManagedStatic** and **llvm_shutdown** explicitly re-initialize/destroy the **DynamicLibrary** state.


https://reviews.llvm.org/D33515





More information about the llvm-commits mailing list