diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-07 17:50:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-07 17:50:11 +0000 |
commit | 0875c7ccf5aaa2ea39e0a406511875ca634b1b28 (patch) | |
tree | 8661fc3c732ac91911d1bffdfdf7a09cd987b0ef /lib/System | |
parent | f361238a9358e18a7b682ac5be93b5236e1b3c23 (diff) | |
download | external_llvm-0875c7ccf5aaa2ea39e0a406511875ca634b1b28.zip external_llvm-0875c7ccf5aaa2ea39e0a406511875ca634b1b28.tar.gz external_llvm-0875c7ccf5aaa2ea39e0a406511875ca634b1b28.tar.bz2 |
we don't use libtool anymore, update comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74924 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System')
-rw-r--r-- | lib/System/DynamicLibrary.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/System/DynamicLibrary.cpp b/lib/System/DynamicLibrary.cpp index ef5c9e6..4260d19 100644 --- a/lib/System/DynamicLibrary.cpp +++ b/lib/System/DynamicLibrary.cpp @@ -23,26 +23,18 @@ static std::map<std::string, void*> symbols; static llvm::sys::SmartRWMutex<true> SymbolsLock; - void llvm::sys::DynamicLibrary::AddSymbol(const char* symbolName, void *symbolValue) { llvm::sys::SmartScopedWriter<true> Writer(&SymbolsLock); symbols[symbolName] = symbolValue; } -// It is not possible to use ltdl.c on VC++ builds as the terms of its LGPL -// license and special exception would cause all of LLVM to be placed under -// the LGPL. This is because the exception applies only when libtool is -// used, and obviously libtool is not used with Visual Studio. An entirely -// separate implementation is provided in win32/DynamicLibrary.cpp. - #ifdef LLVM_ON_WIN32 #include "Win32/DynamicLibrary.inc" #else -//#include "ltdl.h" #include <dlfcn.h> #include <cassert> using namespace llvm; @@ -53,7 +45,6 @@ using namespace llvm::sys; //=== independent code. //===----------------------------------------------------------------------===// -//static std::vector<lt_dlhandle> OpenedHandles; static std::vector<void *> OpenedHandles; DynamicLibrary::DynamicLibrary() {} @@ -61,7 +52,8 @@ DynamicLibrary::DynamicLibrary() {} DynamicLibrary::~DynamicLibrary() { SmartScopedWriter<true> Writer(&SymbolsLock); while(!OpenedHandles.empty()) { - void *H = OpenedHandles.back(); OpenedHandles.pop_back(); + void *H = OpenedHandles.back(); + OpenedHandles.pop_back(); dlclose(H); } } @@ -80,8 +72,6 @@ bool DynamicLibrary::LoadLibraryPermanently(const char *Filename, } void* DynamicLibrary::SearchForAddressOfSymbol(const char* symbolName) { - // check_ltdl_initialization(); - // First check symbols added via AddSymbol(). SymbolsLock.reader_acquire(); std::map<std::string, void *>::iterator I = symbols.find(symbolName); |