[PATCH] D29955: Allow externally dlopen-ed libraries to be registered as permanent libraries.

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 15 17:06:17 PST 2017


vsk added a comment.

What's the expected use of the new API? Do we provide a portable way to dlopen() something with special flags?



================
Comment at: include/llvm/Support/DynamicLibrary.h:71
 
+    static DynamicLibrary addPermanentLibrary(void *handle);
+
----------------
Please add some doxygen comments for the new function, with a description of what 'handle' is.


================
Comment at: lib/Support/DynamicLibrary.cpp:75
 
+DynamicLibrary DynamicLibrary::addPermanentLibrary(void *handle) {
   if (!OpenedHandles)
----------------
You won't have the symbols mutex held here if you call this method directly. Is that fine? I'm not really sure what that mutex protects (seems like more than just the ExplicitSymbols map)..


Repository:
  rL LLVM

https://reviews.llvm.org/D29955





More information about the llvm-commits mailing list