mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
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
This commit is contained in:
parent
f361238a93
commit
0875c7ccf5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user