diff options
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
-rw-r--r-- | clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index b95851e..dc8409f 100644 --- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -203,24 +203,7 @@ bool ExecuteCompilerInvocation(CompilerInstance *Clang) { return true; } - // Load any requested plugins. - for (const std::string &Path : Clang->getFrontendOpts().Plugins) { - std::string Error; - if (llvm::sys::DynamicLibrary::LoadLibraryPermanently(Path.c_str(), &Error)) - Clang->getDiagnostics().Report(diag::err_fe_unable_to_load_plugin) - << Path << Error; - } - - // Check if any of the loaded plugins replaces the main AST action - for (const FrontendPluginRegistry::entry &Plugin : - FrontendPluginRegistry::entries()) { - std::unique_ptr<PluginASTAction> P(Plugin.instantiate()); - if (P->getActionType() == PluginASTAction::ReplaceAction) { - Clang->getFrontendOpts().ProgramAction = clang::frontend::PluginAction; - Clang->getFrontendOpts().ActionName = Plugin.getName().str(); - break; - } - } + Clang->LoadRequestedPlugins(); // Honor -mllvm. // |