aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ADT/APIntTest.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@quicinc.com>2022-12-10 10:34:54 -0600
committerKrzysztof Parzyszek <kparzysz@quicinc.com>2022-12-10 14:03:29 -0600
commit29041bc0507f2b04d116ee3150bfd61ea01c5565 (patch)
treefe9f0e81beecb83ad578c1ab237a3377a128fb48 /llvm/unittests/ADT/APIntTest.cpp
parentf5deb6bf3901ff34be845e44c9ae678cbc2e3cdf (diff)
downloadllvm-29041bc0507f2b04d116ee3150bfd61ea01c5565.zip
llvm-29041bc0507f2b04d116ee3150bfd61ea01c5565.tar.gz
llvm-29041bc0507f2b04d116ee3150bfd61ea01c5565.tar.bz2
[APInt] Convert GetMostSignificantDifferentBit to std::optional
Diffstat (limited to 'llvm/unittests/ADT/APIntTest.cpp')
-rw-r--r--llvm/unittests/ADT/APIntTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/unittests/ADT/APIntTest.cpp b/llvm/unittests/ADT/APIntTest.cpp
index b306a6d..3055581 100644
--- a/llvm/unittests/ADT/APIntTest.cpp
+++ b/llvm/unittests/ADT/APIntTest.cpp
@@ -13,6 +13,7 @@
#include "llvm/ADT/Twine.h"
#include "gtest/gtest.h"
#include <array>
+#include <optional>
using namespace llvm;
@@ -2956,7 +2957,7 @@ TEST(APIntTest, GetMostSignificantDifferentBit) {
TEST(APIntTest, GetMostSignificantDifferentBitExaustive) {
auto GetHighestDifferentBitBruteforce =
- [](const APInt &V0, const APInt &V1) -> llvm::Optional<unsigned> {
+ [](const APInt &V0, const APInt &V1) -> std::optional<unsigned> {
assert(V0.getBitWidth() == V1.getBitWidth() && "Must have same bitwidth");
if (V0 == V1)
return std::nullopt; // Bitwise identical.