[llvm] 0cd85e2 - [Analysis] Use std::optional in ObjCARCAnalysisUtils.h (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 27 12:18:47 PST 2022
Author: Kazu Hirata
Date: 2022-11-27T12:18:21-08:00
New Revision: 0cd85e25a4b117af2441d62219c776543fe4bbef
URL: https://github.com/llvm/llvm-project/commit/0cd85e25a4b117af2441d62219c776543fe4bbef
DIFF: https://github.com/llvm/llvm-project/commit/0cd85e25a4b117af2441d62219c776543fe4bbef.diff
LOG: [Analysis] Use std::optional in ObjCARCAnalysisUtils.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/ObjCARCAnalysisUtils.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/ObjCARCAnalysisUtils.h b/llvm/include/llvm/Analysis/ObjCARCAnalysisUtils.h
index 557528e84371..3e1a892a4a54 100644
--- a/llvm/include/llvm/Analysis/ObjCARCAnalysisUtils.h
+++ b/llvm/include/llvm/Analysis/ObjCARCAnalysisUtils.h
@@ -28,6 +28,7 @@
#include "llvm/IR/Constants.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/ValueHandle.h"
+#include <optional>
namespace llvm {
@@ -229,13 +230,13 @@ class ARCMDKindCache {
Module *M;
/// The Metadata Kind for clang.imprecise_release metadata.
- llvm::Optional<unsigned> ImpreciseReleaseMDKind;
+ std::optional<unsigned> ImpreciseReleaseMDKind;
/// The Metadata Kind for clang.arc.copy_on_escape metadata.
- llvm::Optional<unsigned> CopyOnEscapeMDKind;
+ std::optional<unsigned> CopyOnEscapeMDKind;
/// The Metadata Kind for clang.arc.no_objc_arc_exceptions metadata.
- llvm::Optional<unsigned> NoObjCARCExceptionsMDKind;
+ std::optional<unsigned> NoObjCARCExceptionsMDKind;
public:
void init(Module *Mod) {
More information about the llvm-commits
mailing list