From c0c5ffad4344c9b611b4166313b574c8ca9e20b4 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 27 Nov 2022 11:48:57 -0800 Subject: [PATCH] [ADT] Use std::optional in TypeSwitch.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/TypeSwitch.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/include/llvm/ADT/TypeSwitch.h b/llvm/include/llvm/ADT/TypeSwitch.h index cf58808..044b243 100644 --- a/llvm/include/llvm/ADT/TypeSwitch.h +++ b/llvm/include/llvm/ADT/TypeSwitch.h @@ -18,6 +18,7 @@ #include "llvm/ADT/Optional.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/Casting.h" +#include namespace llvm { namespace detail { @@ -145,7 +146,7 @@ public: private: /// The pointer to the result of this switch statement, once known, /// null before that. - Optional result; + std::optional result; }; /// Specialization of TypeSwitch for void returning callables. -- 2.7.4