[llvm] d1925fa - [Analysis] Use std::optional in BasicAliasAnalysis.h (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 27 11:49:19 PST 2022
Author: Kazu Hirata
Date: 2022-11-27T11:48:58-08:00
New Revision: d1925fa27a379ea7cf9625e62f98af967c7bae3c
URL: https://github.com/llvm/llvm-project/commit/d1925fa27a379ea7cf9625e62f98af967c7bae3c
DIFF: https://github.com/llvm/llvm-project/commit/d1925fa27a379ea7cf9625e62f98af967c7bae3c.diff
LOG: [Analysis] Use std::optional in BasicAliasAnalysis.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/BasicAliasAnalysis.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/BasicAliasAnalysis.h b/llvm/include/llvm/Analysis/BasicAliasAnalysis.h
index f3c80c676d0ad..77c4e47086c4f 100644
--- a/llvm/include/llvm/Analysis/BasicAliasAnalysis.h
+++ b/llvm/include/llvm/Analysis/BasicAliasAnalysis.h
@@ -19,6 +19,7 @@
#include "llvm/IR/PassManager.h"
#include "llvm/Pass.h"
#include <memory>
+#include <optional>
#include <utility>
namespace llvm {
@@ -187,8 +188,8 @@ BasicAAResult createLegacyPMBasicAAResult(Pass &P, Function &F);
/// they live long enough to be queried, but we re-use them each time.
class LegacyAARGetter {
Pass &P;
- Optional<BasicAAResult> BAR;
- Optional<AAResults> AAR;
+ std::optional<BasicAAResult> BAR;
+ std::optional<AAResults> AAR;
public:
LegacyAARGetter(Pass &P) : P(P) {}
More information about the llvm-commits
mailing list