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
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Casting.h"
+#include <optional>
namespace llvm {
namespace detail {
private:
/// The pointer to the result of this switch statement, once known,
/// null before that.
- Optional<ResultT> result;
+ std::optional<ResultT> result;
};
/// Specialization of TypeSwitch for void returning callables.