[PATCH] D144945: [Doc][NFC] Add template type when use MachinePassRegistry.
WangLian via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 28 00:31:51 PST 2023
Jimerlife created this revision.
Jimerlife added reviewers: serge-sans-paille, gribozavr.
Jimerlife added a project: LLVM.
Herald added a subscriber: awarzynski.
Herald added a project: All.
Jimerlife requested review of this revision.
Herald added subscribers: llvm-commits, jacquesguan.
Update `WritingAnLLVMPass.rst`, add template type when use `MachinePassRegistry`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D144945
Files:
llvm/docs/WritingAnLLVMPass.rst
Index: llvm/docs/WritingAnLLVMPass.rst
===================================================================
--- llvm/docs/WritingAnLLVMPass.rst
+++ llvm/docs/WritingAnLLVMPass.rst
@@ -1263,7 +1263,7 @@
.. code-block:: c++
- MachinePassRegistry RegisterMyPasses::Registry;
+ MachinePassRegistry<RegisterMyPasses::FunctionPassCtor> RegisterMyPasses::Registry;
And finally, declare the command line option for your passes. Example:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144945.501046.patch
Type: text/x-patch
Size: 441 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230228/cb8facfe/attachment.bin>
More information about the llvm-commits
mailing list