llvm-project/clang/examples
Timm Bäder 3e67cf21a1 [clang][driver] Add -fplugin-arg- to pass arguments to plugins
From GCC's manpage:
-fplugin-arg-name-key=value
   Define an argument called key with a value of value for the
   plugin called name.

Since we don't have a key-value pair similar to gcc's plugin_argument
struct, simply accept key=value here anyway and pass it along as-is to
plugins.

This translates to the already existing '-plugin-arg-pluginname arg'
that clang cc1 accepts.

There is an ambiguity here because in clang, both the plugin name
as well as the option name can contain dashes, so when e.g. passing

 -fplugin-arg-foo-bar-foo

it is not clear whether the plugin is foo-bar and the option is foo,
or the plugin is foo and the option is bar-foo. GCC solves this by
interpreting all dashes as part of the option name. So dashes can't be
part of the plugin name in this case.

Differential Revision: https://reviews.llvm.org/D113250
2021-11-25 10:47:55 +01:00
..
AnnotateFunctions
Attribute
CallSuperAttribute [clang][driver] Add -fplugin-arg- to pass arguments to plugins 2021-11-25 10:47:55 +01:00
PluginsOrder [clang] Add plugin ActionType to run command line plugin before main action 2021-10-20 08:58:20 -07:00
PrintFunctionNames
CMakeLists.txt Reinstate "[clang-repl] Re-implement clang-interpreter as a test case." 2021-10-26 19:29:56 +00:00