This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGeae3b2a715d7: [clang][cli] Fix round-trip of OPT_plugin_arg (authored by john.brawn).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99606/new/ https://reviews.llvm.org/D99606 Files: clang/lib/Frontend/CompilerInvocation.cpp Index: clang/lib/Frontend/CompilerInvocation.cpp =================================================================== --- clang/lib/Frontend/CompilerInvocation.cpp +++ clang/lib/Frontend/CompilerInvocation.cpp @@ -211,6 +211,7 @@ switch (OptClass) { case Option::SeparateClass: case Option::JoinedOrSeparateClass: + case Option::JoinedAndSeparateClass: Args.push_back(Spelling); Args.push_back(SA(Value)); break; @@ -2477,9 +2478,13 @@ GenerateProgramAction(); - for (const auto &PluginArgs : Opts.PluginArgs) + for (const auto &PluginArgs : Opts.PluginArgs) { + Option Opt = getDriverOptTable().getOption(OPT_plugin_arg); + const char *Spelling = + SA(Opt.getPrefix() + Opt.getName() + PluginArgs.first); for (const auto &PluginArg : PluginArgs.second) - GenerateArg(Args, OPT_plugin_arg, PluginArgs.first + PluginArg, SA); + denormalizeString(Args, Spelling, SA, Opt.getKind(), 0, PluginArg); + } for (const auto &Ext : Opts.ModuleFileExtensions) if (auto *TestExt = dyn_cast_or_null<TestModuleFileExtension>(Ext.get()))
Index: clang/lib/Frontend/CompilerInvocation.cpp =================================================================== --- clang/lib/Frontend/CompilerInvocation.cpp +++ clang/lib/Frontend/CompilerInvocation.cpp @@ -211,6 +211,7 @@ switch (OptClass) { case Option::SeparateClass: case Option::JoinedOrSeparateClass: + case Option::JoinedAndSeparateClass: Args.push_back(Spelling); Args.push_back(SA(Value)); break; @@ -2477,9 +2478,13 @@ GenerateProgramAction(); - for (const auto &PluginArgs : Opts.PluginArgs) + for (const auto &PluginArgs : Opts.PluginArgs) { + Option Opt = getDriverOptTable().getOption(OPT_plugin_arg); + const char *Spelling = + SA(Opt.getPrefix() + Opt.getName() + PluginArgs.first); for (const auto &PluginArg : PluginArgs.second) - GenerateArg(Args, OPT_plugin_arg, PluginArgs.first + PluginArg, SA); + denormalizeString(Args, Spelling, SA, Opt.getKind(), 0, PluginArg); + } for (const auto &Ext : Opts.ModuleFileExtensions) if (auto *TestExt = dyn_cast_or_null<TestModuleFileExtension>(Ext.get()))
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits