TargetLowering: convert Optional to std::optional
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
index 4a9521d..4dcf14a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
@@ -33,6 +33,7 @@
#include <algorithm>
#include <cassert>
#include <cstdint>
+#include <optional>
#include <utility>
#include <vector>
@@ -702,14 +703,14 @@
/// Records if this value needs to be treated in an ABI dependant manner,
/// different to normal type legalization.
- Optional<CallingConv::ID> CallConv;
+ std::optional<CallingConv::ID> CallConv;
RegsForValue() = default;
RegsForValue(const SmallVector<unsigned, 4> ®s, MVT regvt, EVT valuevt,
- Optional<CallingConv::ID> CC = None);
+ std::optional<CallingConv::ID> CC = std::nullopt);
RegsForValue(LLVMContext &Context, const TargetLowering &TLI,
const DataLayout &DL, unsigned Reg, Type *Ty,
- Optional<CallingConv::ID> CC);
+ std::optional<CallingConv::ID> CC);
bool isABIMangled() const { return CallConv.has_value(); }