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/DenseMapInfo.h"
#include "llvm/ADT/Optional.h"
#include "llvm/IR/PassManagerImpl.h"
+#include <optional>
using namespace llvm;
// Now walk all the functions to see if any inner analysis invalidation is
// necessary.
for (Function &F : M) {
- Optional<PreservedAnalyses> FunctionPA;
+ std::optional<PreservedAnalyses> FunctionPA;
// Check to see whether the preserved set needs to be pruned based on
// module-level analysis invalidation that triggers deferred invalidation