From 9178753e639378a88ba3707e48a2c8a20cb8b0f2 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 27 Nov 2022 14:16:01 -0800 Subject: [PATCH] [Support] Use std::optional in CachePruning.h (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 --- llvm/include/llvm/Support/CachePruning.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/include/llvm/Support/CachePruning.h b/llvm/include/llvm/Support/CachePruning.h index c639501..2e8f8fc 100644 --- a/llvm/include/llvm/Support/CachePruning.h +++ b/llvm/include/llvm/Support/CachePruning.h @@ -17,6 +17,7 @@ #include "llvm/ADT/Optional.h" #include "llvm/Support/MemoryBuffer.h" #include +#include namespace llvm { @@ -30,7 +31,7 @@ struct CachePruningPolicy { /// directory too often. It does not impact the decision of which file to /// prune. A value of 0 forces the scan to occur. A value of None disables /// pruning. - llvm::Optional Interval = std::chrono::seconds(1200); + std::optional Interval = std::chrono::seconds(1200); /// The expiration for a file. When a file hasn't been accessed for Expiration /// seconds, it is removed from the cache. A value of 0 disables the -- 2.7.4