aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@quicinc.com>2022-12-07 19:34:42 -0600
committerKrzysztof Parzyszek <kparzysz@quicinc.com>2022-12-08 08:35:11 -0600
commitea6ed399b29c25fb685af16eb7f722fd1649b37a (patch)
tree0068421fa8132fbcd005923e342534094e31ea2b /llvm/unittests
parent489d22f18c7865800abbda6720343b8b67d9fc54 (diff)
downloadllvm-ea6ed399b29c25fb685af16eb7f722fd1649b37a.zip
llvm-ea6ed399b29c25fb685af16eb7f722fd1649b37a.tar.gz
llvm-ea6ed399b29c25fb685af16eb7f722fd1649b37a.tar.bz2
[SCEV] Convert Optional to std::optional
Diffstat (limited to 'llvm/unittests')
-rw-r--r--llvm/unittests/ADT/APIntTest.cpp5
-rw-r--r--llvm/unittests/Analysis/ScalarEvolutionTest.cpp10
2 files changed, 7 insertions, 8 deletions
diff --git a/llvm/unittests/ADT/APIntTest.cpp b/llvm/unittests/ADT/APIntTest.cpp
index c5a9859..b306a6d 100644
--- a/llvm/unittests/ADT/APIntTest.cpp
+++ b/llvm/unittests/ADT/APIntTest.cpp
@@ -2895,9 +2895,8 @@ TEST(APIntTest, SolveQuadraticEquationWrap) {
continue;
for (int B = Low; B != High; ++B) {
for (int C = Low; C != High; ++C) {
- Optional<APInt> S = APIntOps::SolveQuadraticEquationWrap(
- APInt(Width, A), APInt(Width, B),
- APInt(Width, C), Width);
+ std::optional<APInt> S = APIntOps::SolveQuadraticEquationWrap(
+ APInt(Width, A), APInt(Width, B), APInt(Width, C), Width);
if (S)
Validate(A, B, C, Width, S->getSExtValue());
}
diff --git a/llvm/unittests/Analysis/ScalarEvolutionTest.cpp b/llvm/unittests/Analysis/ScalarEvolutionTest.cpp
index 1470822..c6821fa 100644
--- a/llvm/unittests/Analysis/ScalarEvolutionTest.cpp
+++ b/llvm/unittests/Analysis/ScalarEvolutionTest.cpp
@@ -58,11 +58,11 @@ protected:
Test(*F, *LI, SE);
}
- static Optional<APInt> computeConstantDifference(ScalarEvolution &SE,
- const SCEV *LHS,
- const SCEV *RHS) {
- return SE.computeConstantDifference(LHS, RHS);
- }
+static std::optional<APInt> computeConstantDifference(ScalarEvolution &SE,
+ const SCEV *LHS,
+ const SCEV *RHS) {
+ return SE.computeConstantDifference(LHS, RHS);
+}
static bool matchURem(ScalarEvolution &SE, const SCEV *Expr, const SCEV *&LHS,
const SCEV *&RHS) {