mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
Fix ExplicitSymbols leak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80589 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b4f770b68a
commit
72ddf7b555
@ -25,6 +25,13 @@
|
||||
// Collection of symbol name/value pairs to be searched prior to any libraries.
|
||||
static std::map<std::string, void*> *ExplicitSymbols = 0;
|
||||
|
||||
static struct ExplicitSymbolsDeleter {
|
||||
~ExplicitSymbolsDeleter() {
|
||||
if (ExplicitSymbols)
|
||||
delete ExplicitSymbols;
|
||||
}
|
||||
} Dummy;
|
||||
|
||||
void llvm::sys::DynamicLibrary::AddSymbol(const char* symbolName,
|
||||
void *symbolValue) {
|
||||
if (ExplicitSymbols == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user