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
This commit is contained in:
Owen Anderson
2009-07-07 18:33:04 +00:00
parent fd15beefee
commit a9d1f2c559
18 changed files with 76 additions and 78 deletions
+4 -4
View File
@@ -42,7 +42,7 @@ namespace {
namespace llvmc {
PluginLoader::PluginLoader() {
llvm::sys::SmartScopedLock<true> Lock(&*PluginMutex);
llvm::sys::SmartScopedLock<true> Lock(*PluginMutex);
if (!pluginListInitialized) {
for (PluginRegistry::iterator B = PluginRegistry::begin(),
E = PluginRegistry::end(); B != E; ++B)
@@ -53,7 +53,7 @@ namespace llvmc {
}
PluginLoader::~PluginLoader() {
llvm::sys::SmartScopedLock<true> Lock(&*PluginMutex);
llvm::sys::SmartScopedLock<true> Lock(*PluginMutex);
if (pluginListInitialized) {
for (PluginList::iterator B = Plugins.begin(), E = Plugins.end();
B != E; ++B)
@@ -63,14 +63,14 @@ namespace llvmc {
}
void PluginLoader::PopulateLanguageMap(LanguageMap& langMap) {
llvm::sys::SmartScopedLock<true> Lock(&*PluginMutex);
llvm::sys::SmartScopedLock<true> Lock(*PluginMutex);
for (PluginList::iterator B = Plugins.begin(), E = Plugins.end();
B != E; ++B)
(*B)->PopulateLanguageMap(langMap);
}
void PluginLoader::PopulateCompilationGraph(CompilationGraph& graph) {
llvm::sys::SmartScopedLock<true> Lock(&*PluginMutex);
llvm::sys::SmartScopedLock<true> Lock(*PluginMutex);
for (PluginList::iterator B = Plugins.begin(), E = Plugins.end();
B != E; ++B)
(*B)->PopulateCompilationGraph(graph);