- /// PopulateCompilationGraph - Populates the compilation graph by
- /// calling PopulateCompilationGraph methods of all plugins.
- void PopulateCompilationGraph(CompilationGraph& tools);
+ /// PluginLoader - Helper class used by the main program for
+ /// lifetime management.
+ struct PluginLoader {
+ PluginLoader();
+ ~PluginLoader();
+
+ /// RunInitialization - Calls PreprocessOptions, PopulateLanguageMap and
+ /// PopulateCompilationGraph methods of all plugins. This populates the
+ /// global language map and the compilation graph.
+ int RunInitialization(LanguageMap& langMap, CompilationGraph& graph) const;
+
+ private:
+ // noncopyable
+ PluginLoader(const PluginLoader& other);
+ const PluginLoader& operator=(const PluginLoader& other);
+ };