[llvm] r304166 - [ManagedStatic] Make object_creator/object_deleter visible again.

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Mon May 29 11:00:33 PDT 2017


Author: d0k
Date: Mon May 29 13:00:33 2017
New Revision: 304166

URL: http://llvm.org/viewvc/llvm-project?rev=304166&view=rev
Log:
[ManagedStatic] Make object_creator/object_deleter visible again.

They're now exposed as template args, which creates complications when
ManagedStatics are used across .so boundaries.

Modified:
    llvm/trunk/include/llvm/Support/ManagedStatic.h

Modified: llvm/trunk/include/llvm/Support/ManagedStatic.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ManagedStatic.h?rev=304166&r1=304165&r2=304166&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/ManagedStatic.h (original)
+++ llvm/trunk/include/llvm/Support/ManagedStatic.h Mon May 29 13:00:33 2017
@@ -14,25 +14,20 @@
 #ifndef LLVM_SUPPORT_MANAGEDSTATIC_H
 #define LLVM_SUPPORT_MANAGEDSTATIC_H
 
-#include "llvm/Support/Compiler.h"
 #include <atomic>
 #include <cstddef>
 
 namespace llvm {
 
 /// object_creator - Helper method for ManagedStatic.
-template<class C>
-LLVM_LIBRARY_VISIBILITY void* object_creator() {
-  return new C();
-}
+template <class C> void *object_creator() { return new C(); }
 
 /// object_deleter - Helper method for ManagedStatic.
 ///
-template <typename T> struct LLVM_LIBRARY_VISIBILITY object_deleter {
+template <typename T> struct object_deleter {
   static void call(void *Ptr) { delete (T *)Ptr; }
 };
-template <typename T, size_t N>
-struct LLVM_LIBRARY_VISIBILITY object_deleter<T[N]> {
+template <typename T, size_t N> struct object_deleter<T[N]> {
   static void call(void *Ptr) { delete[](T *)Ptr; }
 };
 




More information about the llvm-commits mailing list