X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCompilerDriver%2FPlugin.cpp;h=0fdfef4c6a29b7044b93d01ceb7ebd590cf926f9;hb=170f06ebe2e80ce8bda87425081541493056fb10;hp=7310d120bff58169ee325ffd14f525fb6a62903c;hpb=a9d1f2c559ef4b2549e29288fe6944e68913ba0f;p=oota-llvm.git diff --git a/lib/CompilerDriver/Plugin.cpp b/lib/CompilerDriver/Plugin.cpp index 7310d120bff..0fdfef4c6a2 100644 --- a/lib/CompilerDriver/Plugin.cpp +++ b/lib/CompilerDriver/Plugin.cpp @@ -62,18 +62,17 @@ namespace llvmc { pluginListInitialized = false; } - void PluginLoader::PopulateLanguageMap(LanguageMap& langMap) { + void PluginLoader::RunInitialization(LanguageMap& langMap, + CompilationGraph& graph) const + { llvm::sys::SmartScopedLock 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 Lock(*PluginMutex); - for (PluginList::iterator B = Plugins.begin(), E = Plugins.end(); - B != E; ++B) - (*B)->PopulateCompilationGraph(graph); + B != E; ++B) { + const BasePlugin* BP = *B; + BP->PreprocessOptions(); + BP->PopulateLanguageMap(langMap); + BP->PopulateCompilationGraph(graph); + } } }