summaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2019-01-05 01:10:20 +0000
committerNico Weber <nicolasweber@gmx.de>2019-01-05 01:10:20 +0000
commit6cb22f178c14c7b52595f53d51c661e36afa090f (patch)
tree18b57cf2de52e6eab7d6cff03c25ec91bd2eb18e /lib/Frontend/CompilerInvocation.cpp
parent3bd81ff22212f694b92736739bfcaccd86da737c (diff)
downloadclang-6cb22f178c14c7b52595f53d51c661e36afa090f.tar.gz
Move -add-plugin validation after -load was executed.
Moves the code added in r350340 around a bit, to hopefully make the existing plugin tests pass when clang is built with examples enabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350451 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--lib/Frontend/CompilerInvocation.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index 00083bd622..04105f0980 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -1666,20 +1666,7 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
Opts.ProgramAction = frontend::PluginAction;
Opts.ActionName = A->getValue();
}
- for (const std::string &Arg : Args.getAllArgValues(OPT_add_plugin)) {
- bool Found = false;
- for (FrontendPluginRegistry::iterator it = FrontendPluginRegistry::begin(),
- ie = FrontendPluginRegistry::end();
- it != ie; ++it) {
- if (it->getName() == Arg)
- Found = true;
- }
- if (!Found) {
- Diags.Report(diag::err_fe_invalid_plugin_name) << Arg;
- continue;
- }
- Opts.AddPluginActions.push_back(Arg);
- }
+ Opts.AddPluginActions = Args.getAllArgValues(OPT_add_plugin);
for (const auto *AA : Args.filtered(OPT_plugin_arg))
Opts.PluginArgs[AA->getValue(0)].emplace_back(AA->getValue(1));