diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-07 18:33:04 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-07 18:33:04 +0000 |
commit | a9d1f2c559ef4b2549e29288fe6944e68913ba0f (patch) | |
tree | 79e3d7e0aafc4352dafe175986671f4353c0c5e2 /lib/Support/PluginLoader.cpp | |
parent | fd15beefeedcb8108913e75e7c736dfcc17b433a (diff) |
Have scoped mutexes take referenes instead of pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74931 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/PluginLoader.cpp')
-rw-r--r-- | lib/Support/PluginLoader.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Support/PluginLoader.cpp b/lib/Support/PluginLoader.cpp index ef32af4b3f..ea191ad739 100644 --- a/lib/Support/PluginLoader.cpp +++ b/lib/Support/PluginLoader.cpp @@ -25,7 +25,7 @@ static ManagedStatic<std::vector<std::string> > Plugins; static ManagedStatic<sys::SmartMutex<true> > PluginsLock; void PluginLoader::operator=(const std::string &Filename) { - sys::SmartScopedLock<true> Lock(&*PluginsLock); + sys::SmartScopedLock<true> Lock(*PluginsLock); std::string Error; if (sys::DynamicLibrary::LoadLibraryPermanently(Filename.c_str(), &Error)) { cerr << "Error opening '" << Filename << "': " << Error @@ -36,12 +36,12 @@ void PluginLoader::operator=(const std::string &Filename) { } unsigned PluginLoader::getNumPlugins() { - sys::SmartScopedLock<true> Lock(&*PluginsLock); + sys::SmartScopedLock<true> Lock(*PluginsLock); return Plugins.isConstructed() ? Plugins->size() : 0; } std::string &PluginLoader::getPlugin(unsigned num) { - sys::SmartScopedLock<true> Lock(&*PluginsLock); + sys::SmartScopedLock<true> Lock(*PluginsLock); assert(Plugins.isConstructed() && num < Plugins->size() && "Asking for an out of bounds plugin"); return (*Plugins)[num]; |