From: Kazu Hirata Date: Sun, 27 Nov 2022 22:40:08 +0000 (-0800) Subject: [IR] Use std::optional in ModuleSummaryIndex.h (NFC) X-Git-Tag: upstream/17.0.6~26289 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f9b93cf3344c53f1a5c071b61430694a924570c7;p=platform%2Fupstream%2Fllvm.git [IR] Use std::optional in ModuleSummaryIndex.h (NFC) This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716 --- diff --git a/llvm/include/llvm/IR/ModuleSummaryIndex.h b/llvm/include/llvm/IR/ModuleSummaryIndex.h index 4bcf21e..e8a9a3b 100644 --- a/llvm/include/llvm/IR/ModuleSummaryIndex.h +++ b/llvm/include/llvm/IR/ModuleSummaryIndex.h @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -1700,7 +1701,7 @@ public: /// For the given \p TypeId, this returns the TypeIdCompatibleVtableMap /// entry if present in the summary map. This may be used when importing. - Optional + std::optional getTypeIdCompatibleVtableSummary(StringRef TypeId) const { auto I = TypeIdCompatibleVtableMap.find(TypeId); if (I == TypeIdCompatibleVtableMap.end())