[llvm] [CommandLine][NFC] Replace 'std::function' with 'function_ref' (PR #75973)
Igor Kudrin via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 19 14:05:06 PST 2023
https://github.com/igorkudrin created https://github.com/llvm/llvm-project/pull/75973
This implements a post-commit suggestion for #75679.
>From 2d82555bdcf20e3006efae48d63cdba0bae4f99a Mon Sep 17 00:00:00 2001
From: Igor Kudrin <ikudrin at accesssoftek.com>
Date: Tue, 19 Dec 2023 13:55:18 -0800
Subject: [PATCH] [CommandLine][NFC] Replace 'std::function' with
'function_ref'
This implements a post-commit suggestion for #75679.
---
llvm/lib/Support/CommandLine.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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;
More information about the llvm-commits
mailing list