diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp index 5dd114c269ccb..33d71fb5ad817 100644 --- a/llvm/lib/IR/Module.cpp +++ b/llvm/lib/IR/Module.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include #include @@ -775,7 +776,7 @@ static VersionTuple getSDKVersionMD(Metadata *MD) { auto *Arr = dyn_cast_or_null(CM->getValue()); if (!Arr) return {}; - auto getVersionComponent = [&](unsigned Index) -> Optional { + auto getVersionComponent = [&](unsigned Index) -> std::optional { if (Index >= Arr->getNumElements()) return None; return (unsigned)Arr->getElementAsInteger(Index);