aboutsummaryrefslogtreecommitdiff
path: root/clang/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
commit9f0c21c1e0e3bc9fc3b8a1f785db8440146a891c (patch)
treefb00deb15429c642644d65116b948b55f06d0f92 /clang/lib/Frontend/CompilerInvocation.cpp
parente6ed8540c5896c54f1ec1f9130af922e15362b93 (diff)
downloadllvm-9f0c21c1e0e3bc9fc3b8a1f785db8440146a891c.zip
llvm-9f0c21c1e0e3bc9fc3b8a1f785db8440146a891c.tar.gz
llvm-9f0c21c1e0e3bc9fc3b8a1f785db8440146a891c.tar.bz2
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. llvm-svn: 350451
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 00083bd..04105f0 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/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));