[IR] Use std::optional in Attributor.h (NFC)
authorKazu Hirata <kazu@google.com>
Mon, 28 Nov 2022 02:24:42 +0000 (18:24 -0800)
committerKazu Hirata <kazu@google.com>
Mon, 28 Nov 2022 02:24:42 +0000 (18:24 -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/Transforms/IPO/Attributor.h

index ec10c5c..04e560a 100644 (file)
 #include "llvm/Transforms/Utils/CallGraphUpdater.h"
 
 #include <map>
+#include <optional>
 
 namespace llvm {
 
@@ -1347,7 +1348,7 @@ struct AttributorConfig {
   DenseSet<const char *> *Allowed = nullptr;
 
   /// Maximum number of iterations to run until fixpoint.
-  Optional<unsigned> MaxFixpointIterations = None;
+  std::optional<unsigned> MaxFixpointIterations = None;
 
   /// A callback function that returns an ORE object from a Function pointer.
   ///{