This revision was automatically updated to reflect the committed changes.
Closed by commit rG3e67cf21a19a: [clang][driver] Add -fplugin-arg- to pass
arguments to plugins (authored by tbaeder).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113250/new/
MaskRay accepted this revision.
MaskRay added a comment.
Thanks!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113250/new/
https://reviews.llvm.org/D113250
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin
tbaeder added a comment.
Hey @MaskRay, I know you've already approved but just to be sure: does the last
round of changes look good?
Thanks
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113250/new/
https://reviews.llvm.org/D113250
___
cfe-c
tbaeder updated this revision to Diff 389121.
tbaeder marked an inline comment as done.
tbaeder added a comment.
Addressed review comments and fixed the tests
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113250/new/
https://reviews.llvm.org/D113250
Files:
clang/docs/ClangPlugins.rst
tbaeder marked 13 inline comments as done.
tbaeder added inline comments.
Comment at: clang/test/Driver/plugin-driver-args.cpp:11
+// Dashes cannot be part of the plugin name here
+// RUN: %clang -fplugin=%llvmshlibdir/CallSuperAttr%pluginext
-fplugin-arg-call_super_plugin-help-
MaskRay accepted this revision.
MaskRay added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/examples/CallSuperAttribute/CallSuperAttrInfo.cpp:150
+ if (args[0] == "help") {
+llvm::errs() << "Help for the CallSuperAttr plugin goes
tbaeder updated this revision to Diff 388853.
tbaeder added a comment.
Added two new warning types and used them for diagnosing malformed
`-fplugin-arg` options. Also added tests for that.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113250/new/
https://reviews.llvm.org/D113250
Files
MaskRay added inline comments.
Comment at: clang/docs/ClangPlugins.rst:131
+
+The clang compiler driver accepts the `fplugin` option to load a plugin.
+Clang plugins can receive arguments from the compiler driver command
Comment at: clang/docs
tbaeder updated this revision to Diff 388417.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113250/new/
https://reviews.llvm.org/D113250
Files:
clang/docs/ClangPlugins.rst
clang/docs/ReleaseNotes.rst
clang/examples/CallSuperAttribute/CallSuperAttrInfo.cpp
clang/include/clang/Driv
MaskRay added inline comments.
Comment at: clang/docs/ClangPlugins.rst:133
+Clang plugins can receive arguments from the compiler driver command
+line via the `fplugin-arg--` option.
+
Mention whether `` can contain `-`
Comment at: clang/test/F
tbaeder added inline comments.
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6625
+auto ArgValue = StringRef(A->getValue());
+auto FirstDashIndex = ArgValue.find('-');
+auto Arg = ArgValue.substr(FirstDashIndex + 1);
MaskRay wrote:
> What if First
tbaeder updated this revision to Diff 388129.
tbaeder added a comment.
I already had a test but forgot to add the file to my local git commit, sorry.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113250/new/
https://reviews.llvm.org/D113250
Files:
clang/docs/ClangPlugins.rst
clang/
MaskRay added a comment.
Then please also update `docs/ClangPlugins.rst` to use driver option instead of
CC1 `-plugin-arg`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113250/new/
https://reviews.llvm.org/D113250
MaskRay requested changes to this revision.
MaskRay added a comment.
This revision now requires changes to proceed.
The idea LGTM. You need a test in `test/Driver` checking how the driver option
maps to the CC1 option.
You may check whether `REQUIRES: plugins, examples` is needed.
===
tbaeder created this revision.
Herald added a subscriber: dang.
tbaeder requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
>From GCC's manpage:
-fplugin-arg-name-key=value
Define an argument called key with a value of value for the
plugin
15 matches
Mail list logo