[llvm] ee77b73 - [IR] Use std::nullopt instead of None (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 4 15:05:27 PST 2022
Author: Kazu Hirata
Date: 2022-12-04T15:05:22-08:00
New Revision: ee77b73c433992717f20e95e10ece542e7726dcf
URL: https://github.com/llvm/llvm-project/commit/ee77b73c433992717f20e95e10ece542e7726dcf
DIFF: https://github.com/llvm/llvm-project/commit/ee77b73c433992717f20e95e10ece542e7726dcf.diff
LOG: [IR] Use std::nullopt instead of None (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/unittests/IR/VPIntrinsicTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/IR/VPIntrinsicTest.cpp b/llvm/unittests/IR/VPIntrinsicTest.cpp
index 963b1a8d7bce..8d1f78daada4 100644
--- a/llvm/unittests/IR/VPIntrinsicTest.cpp
+++ b/llvm/unittests/IR/VPIntrinsicTest.cpp
@@ -162,7 +162,7 @@ TEST_F(VPIntrinsicTest, VPIntrinsicsDefScopes) {
#define END_REGISTER_VP_INTRINSIC(VPID) \
ASSERT_TRUE(ScopeVPID.has_value()); \
ASSERT_EQ(ScopeVPID.value(), Intrinsic::VPID); \
- ScopeVPID = None;
+ ScopeVPID = std::nullopt;
Optional<ISD::NodeType> ScopeOPC;
#define BEGIN_REGISTER_VP_SDNODE(SDOPC, ...) \
@@ -171,7 +171,7 @@ TEST_F(VPIntrinsicTest, VPIntrinsicsDefScopes) {
#define END_REGISTER_VP_SDNODE(SDOPC) \
ASSERT_TRUE(ScopeOPC.has_value()); \
ASSERT_EQ(ScopeOPC.value(), ISD::SDOPC); \
- ScopeOPC = None;
+ ScopeOPC = std::nullopt;
#include "llvm/IR/VPIntrinsics.def"
ASSERT_FALSE(ScopeVPID.has_value());
More information about the llvm-commits
mailing list