diff options
Diffstat (limited to 'llvm/lib/FileCheck/FileCheck.cpp')
-rw-r--r-- | llvm/lib/FileCheck/FileCheck.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/FileCheck/FileCheck.cpp b/llvm/lib/FileCheck/FileCheck.cpp index f428e3f..e2cc6dc 100644 --- a/llvm/lib/FileCheck/FileCheck.cpp +++ b/llvm/lib/FileCheck/FileCheck.cpp @@ -206,7 +206,7 @@ Expected<ExpressionValue> llvm::operator+(const ExpressionValue &LeftOperand, if (LeftOperand.isNegative() && RightOperand.isNegative()) { int64_t LeftValue = cantFail(LeftOperand.getSignedValue()); int64_t RightValue = cantFail(RightOperand.getSignedValue()); - Optional<int64_t> Result = checkedAdd<int64_t>(LeftValue, RightValue); + std::optional<int64_t> Result = checkedAdd<int64_t>(LeftValue, RightValue); if (!Result) return make_error<OverflowError>(); @@ -224,7 +224,7 @@ Expected<ExpressionValue> llvm::operator+(const ExpressionValue &LeftOperand, // Both values are positive at this point. uint64_t LeftValue = cantFail(LeftOperand.getUnsignedValue()); uint64_t RightValue = cantFail(RightOperand.getUnsignedValue()); - Optional<uint64_t> Result = + std::optional<uint64_t> Result = checkedAddUnsigned<uint64_t>(LeftValue, RightValue); if (!Result) return make_error<OverflowError>(); @@ -241,7 +241,7 @@ Expected<ExpressionValue> llvm::operator-(const ExpressionValue &LeftOperand, // Result <= -1 - (max int64_t) which overflows on 1- and 2-complement. if (RightValue > (uint64_t)std::numeric_limits<int64_t>::max()) return make_error<OverflowError>(); - Optional<int64_t> Result = + std::optional<int64_t> Result = checkedSub(LeftValue, static_cast<int64_t>(RightValue)); if (!Result) return make_error<OverflowError>(); @@ -306,7 +306,7 @@ Expected<ExpressionValue> llvm::operator*(const ExpressionValue &LeftOperand, // Result will be positive and can overflow. uint64_t LeftValue = cantFail(LeftOperand.getUnsignedValue()); uint64_t RightValue = cantFail(RightOperand.getUnsignedValue()); - Optional<uint64_t> Result = + std::optional<uint64_t> Result = checkedMulUnsigned<uint64_t>(LeftValue, RightValue); if (!Result) return make_error<OverflowError>(); |