[llvm] c3c0cd6 - [Analysis] Use std::optional in DemandedBits.h (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 27 11:49:22 PST 2022
Author: Kazu Hirata
Date: 2022-11-27T11:49:01-08:00
New Revision: c3c0cd6049106406411a2bceaecb418f62da789a
URL: https://github.com/llvm/llvm-project/commit/c3c0cd6049106406411a2bceaecb418f62da789a
DIFF: https://github.com/llvm/llvm-project/commit/c3c0cd6049106406411a2bceaecb418f62da789a.diff
LOG: [Analysis] Use std::optional in DemandedBits.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/DemandedBits.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/DemandedBits.h b/llvm/include/llvm/Analysis/DemandedBits.h
index 5a68fcbebfea..d5623b7ba5dc 100644
--- a/llvm/include/llvm/Analysis/DemandedBits.h
+++ b/llvm/include/llvm/Analysis/DemandedBits.h
@@ -27,6 +27,7 @@
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Pass.h"
+#include <optional>
namespace llvm {
@@ -101,7 +102,7 @@ class DemandedBits {
class DemandedBitsWrapperPass : public FunctionPass {
private:
- mutable Optional<DemandedBits> DB;
+ mutable std::optional<DemandedBits> DB;
public:
static char ID; // Pass identification, replacement for typeid
More information about the llvm-commits
mailing list