summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-11-29 12:39:10 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-11-29 12:39:10 +0000
commit3468ae1a877daaf23e01739686870f826b25c9e7 (patch)
tree53bb74f294f05abc224b138458048e5925b7131e
parent50f3487fad7c164bb400a811bbba5762d13afb38 (diff)
downloadbcm5719-llvm-3468ae1a877daaf23e01739686870f826b25c9e7.tar.gz
bcm5719-llvm-3468ae1a877daaf23e01739686870f826b25c9e7.zip
We just use ltdl's implementation for this abstraction now. Its portable to
more platforms than LLVM supports. llvm-svn: 18352
-rw-r--r--llvm/lib/System/DynamicLibrary.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/llvm/lib/System/DynamicLibrary.cpp b/llvm/lib/System/DynamicLibrary.cpp
index 477e3051c03..0e1c0a30b5c 100644
--- a/llvm/lib/System/DynamicLibrary.cpp
+++ b/llvm/lib/System/DynamicLibrary.cpp
@@ -12,7 +12,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/System/DynamicLibrary.h"
-#include "llvm/Config/dlfcn.h"
+#include "ltdl.h"
#include <cassert>
//===----------------------------------------------------------------------===//
@@ -20,14 +20,10 @@
//=== independent code.
//===----------------------------------------------------------------------===//
-#ifdef HAVE_LTDL_H
-
namespace llvm {
using namespace sys;
-#ifdef HAVE_LT_DLOPEN
-
DynamicLibrary::DynamicLibrary() : handle(0) {
if (0 != lt_dlinit())
throw std::string(lt_dlerror());
@@ -63,7 +59,7 @@ void *DynamicLibrary::GetAddressOfSymbol(const char *symbolName) {
return lt_dlsym((lt_dlhandle) handle,symbolName);
}
-#else
+#if 0
DynamicLibrary::DynamicLibrary(const char*filename) : handle(0) {
assert(!"Have ltdl.h but not libltdl.a!");
}
@@ -77,12 +73,6 @@ void *DynamicLibrary::GetAddressOfSymbol(const char *symbolName) {
return 0;
}
-#endif // HAVE_DLOPEN
+#endif
} // namespace llvm
-
-#else // HAVE_LTDL_H
-
-#include "platform/DynamicLibrary.cpp"
-
-#endif
OpenPOWER on IntegriCloud