[PATCH] D129130: ManagedStatic: mark as deprecated, about to be removed
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 26 07:55:51 PDT 2022
nhaehnle updated this revision to Diff 447707.
nhaehnle added a comment.
Rebase
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129130/new/
https://reviews.llvm.org/D129130
Files:
llvm/docs/ProgrammersManual.rst
llvm/include/llvm/Support/ManagedStatic.h
Index: llvm/include/llvm/Support/ManagedStatic.h
===================================================================
--- llvm/include/llvm/Support/ManagedStatic.h
+++ llvm/include/llvm/Support/ManagedStatic.h
@@ -80,7 +80,9 @@
///
template <class C, class Creator = object_creator<C>,
class Deleter = object_deleter<C>>
-class ManagedStatic : public ManagedStaticBase {
+class [[deprecated("ManagedStatic is deprecated and will be removed; use "
+ "function scope static variables in a getter function "
+ "instead")]] ManagedStatic : public ManagedStaticBase {
public:
// Accessors.
C &operator*() {
Index: llvm/docs/ProgrammersManual.rst
===================================================================
--- llvm/docs/ProgrammersManual.rst
+++ llvm/docs/ProgrammersManual.rst
@@ -3076,17 +3076,6 @@
When you are done using the LLVM APIs, you should call ``llvm_shutdown()`` to
deallocate memory used for internal structures.
-.. _managedstatic:
-
-Lazy Initialization with ``ManagedStatic``
-------------------------------------------
-
-``ManagedStatic`` is a utility class in LLVM used to implement static
-initialization of static resources, such as the global type tables. In a
-single-threaded environment, it implements a simple lazy initialization scheme.
-When LLVM is compiled with support for multi-threading, however, it uses
-double-checked locking to implement thread-safe lazy initialization.
-
.. _llvmcontext:
Achieving Isolation with ``LLVMContext``
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129130.447707.patch
Type: text/x-patch
Size: 1536 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220726/78d3624d/attachment.bin>
More information about the llvm-commits
mailing list