#include "llvm/TextAPI/Architecture.h"
#include "llvm/TextAPI/InterfaceFile.h"
+#include <optional>
#include <type_traits>
using namespace llvm;
//
// Note that "record" is a term I came up with. In contrast, "literal" is a term
// used by the Mach-O format.
-static Optional<size_t> getRecordSize(StringRef segname, StringRef name) {
+static std::optional<size_t> getRecordSize(StringRef segname, StringRef name) {
if (name == section_names::compactUnwind) {
if (segname == segment_names::ld)
return target->wordSize == 8 ? 32 : 20;
ehFrameSection.addr + isecOff + funcAddrOff;
uint32_t funcLength = reader.readPointer(&dataOff, cie.funcPtrSize);
size_t lsdaAddrOff = 0; // Offset of the LSDA address within the EH frame.
- Optional<uint64_t> lsdaAddrOpt;
+ std::optional<uint64_t> lsdaAddrOpt;
if (cie.fdesHaveAug) {
reader.skipLeb128(&dataOff);
lsdaAddrOff = dataOff;