//===----------------------------------------------------------------------===//
#include "llvm/System/DynamicLibrary.h"
-#include "llvm/Config/dlfcn.h"
+#include "ltdl.h"
#include <cassert>
//===----------------------------------------------------------------------===//
//=== 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());
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!");
}
return 0;
}
-#endif // HAVE_DLOPEN
+#endif
} // namespace llvm
-
-#else // HAVE_LTDL_H
-
-#include "platform/DynamicLibrary.cpp"
-
-#endif