diff options
author | Lang Hames <lhames@gmail.com> | 2015-05-13 00:17:08 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2015-05-13 00:17:08 +0000 |
commit | 9bbc3653c5ccb170167b2ab3c4ec098be83a3d04 (patch) | |
tree | de7ca6ea3e862bd3c06d5230a0b5cb42eeb0222a /lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp | |
parent | 4b6125d788454a7794d5b4a13acc09358105e621 (diff) | |
download | bcm5719-llvm-9bbc3653c5ccb170167b2ab3c4ec098be83a3d04.tar.gz bcm5719-llvm-9bbc3653c5ccb170167b2ab3c4ec098be83a3d04.zip |
[LLD] Add a mutex to prevent concurrent modification of the dylib maps in
MachOLinkingContext.
llvm-svn: 237217
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp')
-rw-r--r-- | lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp index 114a1b8153a..ee85f5c3331 100644 --- a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp +++ b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp @@ -705,6 +705,7 @@ void MachOLinkingContext::createImplicitFiles( void MachOLinkingContext::registerDylib(MachODylibFile *dylib, bool upward) const { + std::lock_guard<std::mutex> lock(_dylibsMutex); _allDylibs.insert(dylib); _pathToDylibMap[dylib->installName()] = dylib; // If path is different than install name, register path too. |