From dd436d3cff53db0c64cc4ef5a671b7985917130e Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 27 Nov 2022 11:48:55 -0800 Subject: [PATCH] [ADT] Use std::optional in StringSwitch.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/ADT/StringSwitch.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/include/llvm/ADT/StringSwitch.h b/llvm/include/llvm/ADT/StringSwitch.h index 6ba75eb..199b155 100644 --- a/llvm/include/llvm/ADT/StringSwitch.h +++ b/llvm/include/llvm/ADT/StringSwitch.h @@ -18,6 +18,7 @@ #include "llvm/Support/Compiler.h" #include #include +#include namespace llvm { @@ -47,7 +48,7 @@ class StringSwitch { /// The pointer to the result of this switch statement, once known, /// null before that. - Optional Result; + std::optional Result; public: explicit StringSwitch(StringRef S) -- 2.7.4