diff options
author | Kazu Hirata <kazu@google.com> | 2022-12-10 17:01:55 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-12-10 17:01:55 -0800 |
commit | b950e061490992061fdbbd58f988eaa6f443f869 (patch) | |
tree | afa272374b9ddfdb5a5df4b946ab9d7689c7c0aa /libc/benchmarks | |
parent | c15a925ada41d80203735b8828f045215910aca4 (diff) | |
download | llvm-b950e061490992061fdbbd58f988eaa6f443f869.tar.gz |
[libc] Use std::optional instead of None in comments (NFC)
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
Diffstat (limited to 'libc/benchmarks')
-rw-r--r-- | libc/benchmarks/automemcpy/lib/RandomFunctionGenerator.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libc/benchmarks/automemcpy/lib/RandomFunctionGenerator.cpp b/libc/benchmarks/automemcpy/lib/RandomFunctionGenerator.cpp index e4ba20542258..c362874bb45f 100644 --- a/libc/benchmarks/automemcpy/lib/RandomFunctionGenerator.cpp +++ b/libc/benchmarks/automemcpy/lib/RandomFunctionGenerator.cpp @@ -166,8 +166,8 @@ static Optional<SizeSpan> AsSizeSpan(size_t Begin, size_t End) { return SS; } -// Generic method to create a `Region` struct with a Span or None if span is -// empty. +// Generic method to create a `Region` struct with a Span or std::nullopt if +// span is empty. template <typename Region> static Optional<Region> As(size_t Begin, size_t End) { if (auto Span = AsSizeSpan(Begin, End)) { @@ -178,7 +178,7 @@ static Optional<Region> As(size_t Begin, size_t End) { return std::nullopt; } -// Returns a Loop struct or None if span is empty. +// Returns a Loop struct or std::nullopt if span is empty. static Optional<Loop> AsLoop(size_t Begin, size_t End, size_t BlockSize) { if (auto Span = AsSizeSpan(Begin, End)) { Loop Output; @@ -189,7 +189,7 @@ static Optional<Loop> AsLoop(size_t Begin, size_t End, size_t BlockSize) { return std::nullopt; } -// Returns an AlignedLoop struct or None if span is empty. +// Returns an AlignedLoop struct or std::nullopt if span is empty. static Optional<AlignedLoop> AsAlignedLoop(size_t Begin, size_t End, size_t BlockSize, size_t Alignment, AlignArg AlignTo) { |