[PATCH] D16760: Add support for importing and exporting Registry objects on Windows
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 2 11:26:59 PST 2016
rnk added inline comments.
================
Comment at: include/llvm/Support/Registry.h:133
@@ +132,3 @@
+ if (Getter) {
+ typedef std::pair<const node *, const node *> Info;
+ Info *I = static_cast<Info *>(Getter());
----------------
This should have a comment. Basically, it's copying the entire registry linked list from another DLL into the current one.
================
Comment at: include/llvm/Support/Registry.h:163
@@ -128,1 +162,3 @@
+#ifdef _MSC_VER
+#define LLVM_EXPORT_REGISTRY(REGISTRY_CLASS) \
----------------
I think this should be LLVM_ON_WIN32. That's actually false for Cygwin and true for mingw. I'm not sure if these dllexport annotations will do the right thing with mingw, but let's find out.
================
Comment at: include/llvm/Support/Registry.h:172
@@ +171,3 @@
+ REGISTRY_CLASS::import(DL, #REGISTRY_CLASS)
+#endif
+
----------------
Do you think we should have an #else block here that defines these macros to nothing on Unix, so that clients don't have to do the platform ifdefs?
http://reviews.llvm.org/D16760
More information about the llvm-commits
mailing list