[llvm-commits] CVS: llvm/lib/System/DynamicLibrary.cpp
Reid Spencer
reid at x10sys.com
Mon Nov 29 04:39:21 PST 2004
Changes in directory llvm/lib/System:
DynamicLibrary.cpp updated: 1.2 -> 1.3
---
Log message:
We just use ltdl's implementation for this abstraction now. Its portable to
more platforms than LLVM supports.
---
Diffs of the changes: (+3 -13)
Index: llvm/lib/System/DynamicLibrary.cpp
diff -u llvm/lib/System/DynamicLibrary.cpp:1.2 llvm/lib/System/DynamicLibrary.cpp:1.3
--- llvm/lib/System/DynamicLibrary.cpp:1.2 Mon Nov 29 04:39:46 2004
+++ llvm/lib/System/DynamicLibrary.cpp Mon Nov 29 06:39:10 2004
@@ -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 @@
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 @@
return 0;
}
-#endif // HAVE_DLOPEN
+#endif
} // namespace llvm
-
-#else // HAVE_LTDL_H
-
-#include "platform/DynamicLibrary.cpp"
-
-#endif
More information about the llvm-commits
mailing list