diff options
| author | Kazu Hirata <kazu@google.com> | 2022-06-25 11:24:23 -0700 |
|---|---|---|
| committer | Kazu Hirata <kazu@google.com> | 2022-06-25 11:24:23 -0700 |
| commit | d152e50c15416c61220f218039c70f0c814e5651 (patch) | |
| tree | f45bf26a724c6b5d4878de5d47674302bb237ca4 /llvm/unittests/ADT/APIntTest.cpp | |
| parent | ab736a2750a99b303f8d6a216f754fb3577abb88 (diff) | |
| download | llvm-d152e50c15416c61220f218039c70f0c814e5651.zip llvm-d152e50c15416c61220f218039c70f0c814e5651.tar.gz llvm-d152e50c15416c61220f218039c70f0c814e5651.tar.bz2 | |
[llvm] Don't use Optional::{hasValue,getValue} (NFC)
Diffstat (limited to 'llvm/unittests/ADT/APIntTest.cpp')
| -rw-r--r-- | llvm/unittests/ADT/APIntTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/ADT/APIntTest.cpp b/llvm/unittests/ADT/APIntTest.cpp index 607560a..e92754c 100644 --- a/llvm/unittests/ADT/APIntTest.cpp +++ b/llvm/unittests/ADT/APIntTest.cpp @@ -2897,7 +2897,7 @@ TEST(APIntTest, SolveQuadraticEquationWrap) { Optional<APInt> S = APIntOps::SolveQuadraticEquationWrap( APInt(Width, A), APInt(Width, B), APInt(Width, C), Width); - if (S.hasValue()) + if (S) Validate(A, B, C, Width, S->getSExtValue()); } } @@ -2978,7 +2978,7 @@ TEST(APIntTest, GetMostSignificantDifferentBitExaustive) { auto Bit = APIntOps::GetMostSignificantDifferentBit(A, B); EXPECT_EQ(Bit, GetHighestDifferentBitBruteforce(A, B)); - if (!Bit.hasValue()) + if (!Bit) EXPECT_EQ(A, B); else { EXPECT_NE(A, B); |
