[llvm] [CommandLine][NFC] Replace 'std::function' with 'function_ref' (PR #75973)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 19 14:05:22 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-support
Author: Igor Kudrin (igorkudrin)
<details>
<summary>Changes</summary>
This implements a post-commit suggestion for #<!-- -->75679.
---
Full diff: https://github.com/llvm/llvm-project/pull/75973.diff
1 Files Affected:
- (modified) llvm/lib/Support/CommandLine.cpp (+1-2)
``````````diff
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index 00179bc32551fe..368dead4491492 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -175,8 +175,7 @@ class CommandLineParser {
StringRef Overview, raw_ostream *Errs = nullptr,
bool LongOptionsUseDoubleDash = false);
- void forEachSubCommand(Option &Opt,
- std::function<void(SubCommand &)> Action) {
+ void forEachSubCommand(Option &Opt, function_ref<void(SubCommand &)> Action) {
if (Opt.Subs.empty()) {
Action(SubCommand::getTopLevel());
return;
``````````
</details>
https://github.com/llvm/llvm-project/pull/75973
More information about the llvm-commits
mailing list