[llvm] a5ef7bb - [SelectionDAG] Use std::optional in SelectionDAGISel.cpp (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 26 15:07:28 PST 2022
Author: Kazu Hirata
Date: 2022-11-26T15:07:23-08:00
New Revision: a5ef7bb5c137529573f626cfe80764db90c1ed98
URL: https://github.com/llvm/llvm-project/commit/a5ef7bb5c137529573f626cfe80764db90c1ed98
DIFF: https://github.com/llvm/llvm-project/commit/a5ef7bb5c137529573f626cfe80764db90c1ed98.diff
LOG: [SelectionDAG] Use std::optional in SelectionDAGISel.cpp (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/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 5dd6cc622557..30fab77f8621 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -102,6 +102,7 @@
#include <iterator>
#include <limits>
#include <memory>
+#include <optional>
#include <string>
#include <utility>
#include <vector>
@@ -2263,7 +2264,7 @@ void SelectionDAGISel::Select_PATCHPOINT(SDNode *N) {
// Cache arguments that will be moved to the end in the target node.
SDValue Chain = *It++;
- Optional<SDValue> Glue;
+ std::optional<SDValue> Glue;
if (It->getValueType() == MVT::Glue)
Glue = *It++;
SDValue RegMask = *It++;
More information about the llvm-commits
mailing list