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/IR/PassManager.h"
#include "llvm/Pass.h"
#include <functional>
+#include <optional>
namespace llvm {
/// Legacy wrapper pass to provide the ModuleSummaryIndex object.
class ModuleSummaryIndexWrapperPass : public ModulePass {
- Optional<ModuleSummaryIndex> Index;
+ std::optional<ModuleSummaryIndex> Index;
public:
static char ID;