[PATCH] D26504: [Support] Use HAVE_DLOPEN to guard dlopen(3) usage
Pavel Labath via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 29 08:01:58 PST 2016
labath updated this revision to Diff 79572.
labath added a comment.
Thank you for checking this out.
HAVE_DLOPEN is defined only if HAVE_DLFCN_H is detected, but I suppose it doesn't hurt to be explicit.
https://reviews.llvm.org/D26504
Files:
lib/Support/DynamicLibrary.cpp
Index: lib/Support/DynamicLibrary.cpp
===================================================================
--- lib/Support/DynamicLibrary.cpp
+++ lib/Support/DynamicLibrary.cpp
@@ -41,7 +41,7 @@
#else
-#if HAVE_DLFCN_H
+#if defined(HAVE_DLFCN_H) && defined(HAVE_DLOPEN)
#include <dlfcn.h>
using namespace llvm;
using namespace llvm::sys;
@@ -119,7 +119,7 @@
return i->second;
}
-#if HAVE_DLFCN_H
+#if defined(HAVE_DLFCN_H) && defined(HAVE_DLOPEN)
// Now search the libraries.
if (OpenedHandles) {
for (DenseSet<void *>::iterator I = OpenedHandles->begin(),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26504.79572.patch
Type: text/x-patch
Size: 587 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161129/4535cd0e/attachment.bin>
More information about the llvm-commits
mailing list