[llvm] 419adb6 - [Analysis] Use std::optional in ModuleSummaryAnalysis.h (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 27 12:18:46 PST 2022
Author: Kazu Hirata
Date: 2022-11-27T12:18:20-08:00
New Revision: 419adb635fd0378140457405dccd55ef06bc83e6
URL: https://github.com/llvm/llvm-project/commit/419adb635fd0378140457405dccd55ef06bc83e6
DIFF: https://github.com/llvm/llvm-project/commit/419adb635fd0378140457405dccd55ef06bc83e6.diff
LOG: [Analysis] Use std::optional in ModuleSummaryAnalysis.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
Added:
Modified:
llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h b/llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h
index eb48ec3af526..185c7df1bf95 100644
--- a/llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h
+++ b/llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h
@@ -18,6 +18,7 @@
#include "llvm/IR/PassManager.h"
#include "llvm/Pass.h"
#include <functional>
+#include <optional>
namespace llvm {
@@ -55,7 +56,7 @@ class ModuleSummaryIndexAnalysis
/// Legacy wrapper pass to provide the ModuleSummaryIndex object.
class ModuleSummaryIndexWrapperPass : public ModulePass {
- Optional<ModuleSummaryIndex> Index;
+ std::optional<ModuleSummaryIndex> Index;
public:
static char ID;
More information about the llvm-commits
mailing list