[llvm] 98e20e1 - [CommandLine][NFC] Replace 'std::function' with 'function_ref' (#75973)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 19 14:15:02 PST 2023
Author: Igor Kudrin
Date: 2023-12-20T05:14:57+07:00
New Revision: 98e20e15ba22e9fed1ff912b8c77645c85aff9ad
URL: https://github.com/llvm/llvm-project/commit/98e20e15ba22e9fed1ff912b8c77645c85aff9ad
DIFF: https://github.com/llvm/llvm-project/commit/98e20e15ba22e9fed1ff912b8c77645c85aff9ad.diff
LOG: [CommandLine][NFC] Replace 'std::function' with 'function_ref' (#75973)
This implements a post-commit suggestion for #75679.
Added:
Modified:
llvm/lib/Support/CommandLine.cpp
Removed:
################################################################################
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