Skip to content

Commit 0ea3386

Browse files
[IR] Use std::optional in Statepoint.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
1 parent f9b93cf commit 0ea3386

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/include/llvm/IR/Statepoint.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <cassert>
3131
#include <cstddef>
3232
#include <cstdint>
33+
#include <optional>
3334
#include <vector>
3435

3536
namespace llvm {
@@ -233,8 +234,8 @@ std::vector<const GCRelocateInst *> GCStatepointInst::getGCRelocates() const {
233234
/// have attributes that describe properties of gc.statepoint call they will be
234235
/// eventually be wrapped in. This struct is used represent such directives.
235236
struct StatepointDirectives {
236-
Optional<uint32_t> NumPatchBytes;
237-
Optional<uint64_t> StatepointID;
237+
std::optional<uint32_t> NumPatchBytes;
238+
std::optional<uint64_t> StatepointID;
238239

239240
static const uint64_t DefaultStatepointID = 0xABCDEF00;
240241
static const uint64_t DeoptBundleStatepointID = 0xABCDEF0F;

0 commit comments

Comments
 (0)