forked from OSchip/llvm-project
[Coroutines] Use std::optional in CoroFrame.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
This commit is contained in:
parent
d7fdb5d87b
commit
8dd2416e44
|
@ -37,6 +37,7 @@
|
|||
#include "llvm/Transforms/Utils/Local.h"
|
||||
#include "llvm/Transforms/Utils/PromoteMemToReg.h"
|
||||
#include <algorithm>
|
||||
#include <optional>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
|
@ -1137,7 +1138,7 @@ static StructType *buildFrameType(Function &F, coro::Shape &Shape,
|
|||
FrameTypeBuilder B(C, DL, MaxFrameAlignment);
|
||||
|
||||
AllocaInst *PromiseAlloca = Shape.getPromiseAlloca();
|
||||
Optional<FieldIDType> SwitchIndexFieldId;
|
||||
std::optional<FieldIDType> SwitchIndexFieldId;
|
||||
|
||||
if (Shape.ABI == coro::ABI::Switch) {
|
||||
auto *FramePtrTy = FrameTy->getPointerTo();
|
||||
|
|
Loading…
Reference in New Issue