[RISCV] Use std::optional in RISCVGatherScatterLowering.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:
Kazu Hirata 2022-11-25 22:59:57 -08:00
parent c672bb674c
commit 7e00820686
1 changed files with 2 additions and 1 deletions

View File

@ -23,6 +23,7 @@
#include "llvm/IR/IntrinsicsRISCV.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/Transforms/Utils/Local.h"
#include <optional>
using namespace llvm;
using namespace PatternMatch;
@ -346,7 +347,7 @@ RISCVGatherScatterLowering::determineBaseAndStride(GetElementPtrInst *GEP,
if (Ops[0]->getType()->isVectorTy())
return std::make_pair(nullptr, nullptr);
Optional<unsigned> VecOperand;
std::optional<unsigned> VecOperand;
unsigned TypeScale = 0;
// Look for a vector operand and scale.