[Analysis] Use std::optional in DemandedBits.h (NFC)
authorKazu Hirata <kazu@google.com>
Sun, 27 Nov 2022 19:49:01 +0000 (11:49 -0800)
committerKazu Hirata <kazu@google.com>
Sun, 27 Nov 2022 19:49:01 +0000 (11:49 -0800)
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

llvm/include/llvm/Analysis/DemandedBits.h

index 5a68fcb..d5623b7 100644 (file)
@@ -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 @@ private:
 
 class DemandedBitsWrapperPass : public FunctionPass {
 private:
-  mutable Optional<DemandedBits> DB;
+  mutable std::optional<DemandedBits> DB;
 
 public:
   static char ID; // Pass identification, replacement for typeid