diff options
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
-rw-r--r-- | llvm/lib/IR/Module.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp index 33d71fb..a9e80b3d 100644 --- a/llvm/lib/IR/Module.cpp +++ b/llvm/lib/IR/Module.cpp @@ -620,7 +620,7 @@ Optional<CodeModel::Model> Module::getCodeModel() const { auto *Val = cast_or_null<ConstantAsMetadata>(getModuleFlag("Code Model")); if (!Val) - return None; + return std::nullopt; return static_cast<CodeModel::Model>( cast<ConstantInt>(Val->getValue())->getZExtValue()); @@ -778,7 +778,7 @@ static VersionTuple getSDKVersionMD(Metadata *MD) { return {}; auto getVersionComponent = [&](unsigned Index) -> std::optional<unsigned> { if (Index >= Arr->getNumElements()) - return None; + return std::nullopt; return (unsigned)Arr->getElementAsInteger(Index); }; auto Major = getVersionComponent(0); |