aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/IntrinsicInst.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@quicinc.com>2022-12-03 13:54:35 -0600
committerKrzysztof Parzyszek <kparzysz@quicinc.com>2022-12-03 13:55:56 -0600
commitab672e91737daa55f18662d569d8c1ae6e0b4dfe (patch)
treeeacbc8ac652e0b9940815c91cfd7a12456e89db7 /llvm/lib/IR/IntrinsicInst.cpp
parent059a23c0f01fd6e5bcef0e403d8108a761ad66f5 (diff)
downloadllvm-ab672e91737daa55f18662d569d8c1ae6e0b4dfe.zip
llvm-ab672e91737daa55f18662d569d8c1ae6e0b4dfe.tar.gz
llvm-ab672e91737daa55f18662d569d8c1ae6e0b4dfe.tar.bz2
FPEnv: convert Optional to std::optional
Diffstat (limited to 'llvm/lib/IR/IntrinsicInst.cpp')
-rw-r--r--llvm/lib/IR/IntrinsicInst.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/IR/IntrinsicInst.cpp b/llvm/lib/IR/IntrinsicInst.cpp
index 242ddc4..1b1e671 100644
--- a/llvm/lib/IR/IntrinsicInst.cpp
+++ b/llvm/lib/IR/IntrinsicInst.cpp
@@ -275,7 +275,7 @@ Value *InstrProfIncrementInst::getStep() const {
return ConstantInt::get(Type::getInt64Ty(Context), 1);
}
-Optional<RoundingMode> ConstrainedFPIntrinsic::getRoundingMode() const {
+std::optional<RoundingMode> ConstrainedFPIntrinsic::getRoundingMode() const {
unsigned NumOperands = arg_size();
Metadata *MD = nullptr;
auto *MAV = dyn_cast<MetadataAsValue>(getArgOperand(NumOperands - 2));
@@ -286,7 +286,7 @@ Optional<RoundingMode> ConstrainedFPIntrinsic::getRoundingMode() const {
return convertStrToRoundingMode(cast<MDString>(MD)->getString());
}
-Optional<fp::ExceptionBehavior>
+std::optional<fp::ExceptionBehavior>
ConstrainedFPIntrinsic::getExceptionBehavior() const {
unsigned NumOperands = arg_size();
Metadata *MD = nullptr;
@@ -299,13 +299,13 @@ ConstrainedFPIntrinsic::getExceptionBehavior() const {
}
bool ConstrainedFPIntrinsic::isDefaultFPEnvironment() const {
- Optional<fp::ExceptionBehavior> Except = getExceptionBehavior();
+ std::optional<fp::ExceptionBehavior> Except = getExceptionBehavior();
if (Except) {
if (Except.value() != fp::ebIgnore)
return false;
}
- Optional<RoundingMode> Rounding = getRoundingMode();
+ std::optional<RoundingMode> Rounding = getRoundingMode();
if (Rounding) {
if (Rounding.value() != RoundingMode::NearestTiesToEven)
return false;