diff --git a/lld/MachO/InputFiles.cpp b/lld/MachO/InputFiles.cpp index bedc273c5283a..374e4f32ce8cb 100644 --- a/lld/MachO/InputFiles.cpp +++ b/lld/MachO/InputFiles.cpp @@ -73,6 +73,7 @@ #include "llvm/TextAPI/Architecture.h" #include "llvm/TextAPI/InterfaceFile.h" +#include #include using namespace llvm; @@ -258,7 +259,7 @@ InputFile::InputFile(Kind kind, const InterfaceFile &interface) // // Note that "record" is a term I came up with. In contrast, "literal" is a term // used by the Mach-O format. -static Optional getRecordSize(StringRef segname, StringRef name) { +static std::optional getRecordSize(StringRef segname, StringRef name) { if (name == section_names::compactUnwind) { if (segname == segment_names::ld) return target->wordSize == 8 ? 32 : 20; @@ -1401,7 +1402,7 @@ void ObjFile::registerEhFrames(Section &ehFrameSection) { 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 lsdaAddrOpt; + std::optional lsdaAddrOpt; if (cie.fdesHaveAug) { reader.skipLeb128(&dataOff); lsdaAddrOff = dataOff;