[PATCH] D42687: [ELF] - Support -plugin-opt=-debugger-tune=xxx option.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 30 08:48:33 PST 2018


George Rimar via Phabricator <reviews at reviews.llvm.org> writes:

>  
> +static DebuggerKind parseLTODebuggerTune(StringRef S, opt::Arg *Arg) {
> +  if (S == "gdb")
> +    return DebuggerKind::GDB;
> +  if (S == "lldb")
> +    return DebuggerKind::LLDB;
> +  if (S == "sce")
> +    return DebuggerKind::SCE;
> +  error(Arg->getSpelling() + "=" + Arg->getValue() + ": unknown tune '" + S +
> +        "'");
> +  return DebuggerKind::Default;
> +}
> +

The gold plugin supports this option by using
InitTargetOptionsFromCodeGenFlags/ParseCommandLineOptions. Could we do
the same and avoid duplicating the parsing of the option?

Cheers,
Rafael


More information about the llvm-commits mailing list