summaryrefslogtreecommitdiff
path: root/libc/benchmarks
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-01-14 20:22:48 -0800
committerKazu Hirata <kazu@google.com>2023-01-14 20:22:48 -0800
commite1cdda57fabddb809b17f30f5dcd3e59518cafa7 (patch)
tree45185a7228c78c987b2afc04102fe083065cf3eb /libc/benchmarks
parenta64846bee0bb4b4912c8cf6bf018ba5d892065d1 (diff)
downloadllvm-e1cdda57fabddb809b17f30f5dcd3e59518cafa7.tar.gz
[libc] Use std::optional instead of llvm::Optional (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/LibcBenchmark.h2
-rw-r--r--libc/benchmarks/LibcBenchmarkTest.cpp2
-rw-r--r--libc/benchmarks/automemcpy/lib/CodeGen.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/libc/benchmarks/LibcBenchmark.h b/libc/benchmarks/LibcBenchmark.h
index e7be9c386f79..3b0a05136ca5 100644
--- a/libc/benchmarks/LibcBenchmark.h
+++ b/libc/benchmarks/LibcBenchmark.h
@@ -99,7 +99,7 @@ struct BenchmarkState {
struct BenchmarkResult {
BenchmarkStatus TerminationStatus = BenchmarkStatus::Running;
Duration BestGuess = {};
- llvm::Optional<llvm::SmallVector<BenchmarkState, 16>> MaybeBenchmarkLog;
+ std::optional<llvm::SmallVector<BenchmarkState, 16>> MaybeBenchmarkLog;
};
// Stores information about a cache in the host memory system.
diff --git a/libc/benchmarks/LibcBenchmarkTest.cpp b/libc/benchmarks/LibcBenchmarkTest.cpp
index c9b21e48e8f7..41a246281efb 100644
--- a/libc/benchmarks/LibcBenchmarkTest.cpp
+++ b/libc/benchmarks/LibcBenchmarkTest.cpp
@@ -78,7 +78,7 @@ protected:
private:
DummyParameterProvider ParameterProvider;
static char DummyFunction(char Payload) { return Payload; }
- llvm::Optional<std::queue<Duration>> MaybeTimepoints;
+ std::optional<std::queue<Duration>> MaybeTimepoints;
};
TEST_F(LibcBenchmark, MaxSamplesReached) {
diff --git a/libc/benchmarks/automemcpy/lib/CodeGen.cpp b/libc/benchmarks/automemcpy/lib/CodeGen.cpp
index b11317934858..d0a356d11265 100644
--- a/libc/benchmarks/automemcpy/lib/CodeGen.cpp
+++ b/libc/benchmarks/automemcpy/lib/CodeGen.cpp
@@ -377,7 +377,7 @@ static raw_ostream &operator<<(raw_ostream &Stream, const FunctionType &T) {
}
template <typename T>
static raw_ostream &operator<<(raw_ostream &Stream,
- const llvm::Optional<T> &MaybeT) {
+ const std::optional<T> &MaybeT) {
if (MaybeT)
return Stream << *MaybeT;
return Stream << "std::nullopt";