[llvm] 6d5669c - [IR] Use std::optional in Attributor.h (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 27 18:26:19 PST 2022
Author: Kazu Hirata
Date: 2022-11-27T18:24:42-08:00
New Revision: 6d5669c723f48a31f7063b14651edfe9c28c24bb
URL: https://github.com/llvm/llvm-project/commit/6d5669c723f48a31f7063b14651edfe9c28c24bb
DIFF: https://github.com/llvm/llvm-project/commit/6d5669c723f48a31f7063b14651edfe9c28c24bb.diff
LOG: [IR] Use std::optional in Attributor.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/Transforms/IPO/Attributor.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h
index ec10c5c3ddb1..04e560a0b3f3 100644
--- a/llvm/include/llvm/Transforms/IPO/Attributor.h
+++ b/llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -129,6 +129,7 @@
#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.
///{
More information about the llvm-commits
mailing list