diff options
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
-rw-r--r-- | llvm/lib/IR/Module.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp index 5dd114c..33d71fb 100644 --- a/llvm/lib/IR/Module.cpp +++ b/llvm/lib/IR/Module.cpp @@ -49,6 +49,7 @@ #include <cassert> #include <cstdint> #include <memory> +#include <optional> #include <utility> #include <vector> @@ -775,7 +776,7 @@ static VersionTuple getSDKVersionMD(Metadata *MD) { auto *Arr = dyn_cast_or_null<ConstantDataArray>(CM->getValue()); if (!Arr) return {}; - auto getVersionComponent = [&](unsigned Index) -> Optional<unsigned> { + auto getVersionComponent = [&](unsigned Index) -> std::optional<unsigned> { if (Index >= Arr->getNumElements()) return None; return (unsigned)Arr->getElementAsInteger(Index); |