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/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/ValueMapper.h"
#include <map>
+#include <optional>
using namespace llvm;
#define DEBUG_TYPE "clone-function"
// duplicate instructions and then freeze them in the MD map. We also record
// information about dbg.value and dbg.declare to avoid duplicating the
// types.
- Optional<DebugInfoFinder> DIFinder;
+ std::optional<DebugInfoFinder> DIFinder;
// Track the subprogram attachment that needs to be cloned to fine-tune the
// mapping within the same module.