[llvm] r258159 - Revert 258157
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 19 10:41:14 PST 2016
Author: reames
Date: Tue Jan 19 12:41:10 2016
New Revision: 258159
URL: http://llvm.org/viewvc/llvm-project?rev=258159&view=rev
Log:
Revert 258157
According the build bots, clang is using the Registry class somewhere as well. Will reapply with appropriate clang changes at a later point.
Modified:
llvm/trunk/include/llvm/Support/Registry.h
llvm/trunk/lib/CodeGen/GCMetadataPrinter.cpp
llvm/trunk/lib/CodeGen/GCStrategy.cpp
Modified: llvm/trunk/include/llvm/Support/Registry.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Registry.h?rev=258159&r1=258158&r2=258159&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Registry.h (original)
+++ llvm/trunk/include/llvm/Support/Registry.h Tue Jan 19 12:41:10 2016
@@ -116,15 +116,14 @@ namespace llvm {
};
};
- // Use this macro to stamp out definitions for required static symbols in an
- // appropriate source file. This is required to avoid getting multiple
- // definitions of the Registry's fields in different translation or linkage
- // units.
-#define DEFINE_REGISTRY(T) \
- template <> \
- typename Registry<T>::node *Registry<T>::Head = nullptr; \
- template <> \
- typename Registry<T>::node *Registry<T>::Tail = nullptr;
+
+ // Since these are defined in a header file, plugins must be sure to export
+ // these symbols.
+ template <typename T>
+ typename Registry<T>::node *Registry<T>::Head;
+
+ template <typename T>
+ typename Registry<T>::node *Registry<T>::Tail;
} // end namespace llvm
#endif // LLVM_SUPPORT_REGISTRY_H
Modified: llvm/trunk/lib/CodeGen/GCMetadataPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GCMetadataPrinter.cpp?rev=258159&r1=258158&r2=258159&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GCMetadataPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/GCMetadataPrinter.cpp Tue Jan 19 12:41:10 2016
@@ -17,7 +17,3 @@ using namespace llvm;
GCMetadataPrinter::GCMetadataPrinter() {}
GCMetadataPrinter::~GCMetadataPrinter() {}
-
-// Stamp out the registry of GCMetadataPrinter objects so that pulgins can load
-// new Strategies.
-DEFINE_REGISTRY(GCMetadataPrinter)
Modified: llvm/trunk/lib/CodeGen/GCStrategy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GCStrategy.cpp?rev=258159&r1=258158&r2=258159&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GCStrategy.cpp (original)
+++ llvm/trunk/lib/CodeGen/GCStrategy.cpp Tue Jan 19 12:41:10 2016
@@ -20,7 +20,3 @@ GCStrategy::GCStrategy()
: UseStatepoints(false), NeededSafePoints(0), CustomReadBarriers(false),
CustomWriteBarriers(false), CustomRoots(false), InitRoots(true),
UsesMetadata(false) {}
-
-// Stamp out the registry of GCStrategy objects so that pulgins can load new
-// Strategies.
-DEFINE_REGISTRY(GCStrategy)
More information about the llvm-commits
mailing list