diff options
author | Kazu Hirata <kazu@google.com> | 2023-01-13 21:05:06 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2023-01-13 21:05:06 -0800 |
commit | a1fe1f5f77d48b03b76884a9b9b91a6795193ac1 (patch) | |
tree | dff85df669b8e463a956beccb9dfe67611426b75 /mlir/unittests | |
parent | a3e975d42efa2ec1349c1a3ce203d78bbd7ee10d (diff) | |
download | llvm-a1fe1f5f77d48b03b76884a9b9b91a6795193ac1.tar.gz |
[mlir] Add #include <optional> (NFC)
This patch adds #include <optional> to those files containing
llvm::Optional<...> or Optional<...>.
I'll post a separate patch to actually replace llvm::Optional with
std::optional.
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
Diffstat (limited to 'mlir/unittests')
5 files changed, 5 insertions, 0 deletions
diff --git a/mlir/unittests/Analysis/Presburger/IntegerPolyhedronTest.cpp b/mlir/unittests/Analysis/Presburger/IntegerPolyhedronTest.cpp index ae9df279dd27..b3d6d54de782 100644 --- a/mlir/unittests/Analysis/Presburger/IntegerPolyhedronTest.cpp +++ b/mlir/unittests/Analysis/Presburger/IntegerPolyhedronTest.cpp @@ -16,6 +16,7 @@ #include <gtest/gtest.h> #include <numeric> +#include <optional> using namespace mlir; using namespace presburger; diff --git a/mlir/unittests/Analysis/Presburger/PresburgerSetTest.cpp b/mlir/unittests/Analysis/Presburger/PresburgerSetTest.cpp index 3e4d272ca11f..17feea052da1 100644 --- a/mlir/unittests/Analysis/Presburger/PresburgerSetTest.cpp +++ b/mlir/unittests/Analysis/Presburger/PresburgerSetTest.cpp @@ -21,6 +21,7 @@ #include <gmock/gmock.h> #include <gtest/gtest.h> +#include <optional> using namespace mlir; using namespace presburger; diff --git a/mlir/unittests/Analysis/Presburger/SimplexTest.cpp b/mlir/unittests/Analysis/Presburger/SimplexTest.cpp index 8ff6d75b3499..8524826e5655 100644 --- a/mlir/unittests/Analysis/Presburger/SimplexTest.cpp +++ b/mlir/unittests/Analysis/Presburger/SimplexTest.cpp @@ -14,6 +14,7 @@ #include <gmock/gmock.h> #include <gtest/gtest.h> +#include <optional> using namespace mlir; using namespace presburger; diff --git a/mlir/unittests/Analysis/Presburger/Utils.h b/mlir/unittests/Analysis/Presburger/Utils.h index 70ccb484bb42..e18f0ebd09dc 100644 --- a/mlir/unittests/Analysis/Presburger/Utils.h +++ b/mlir/unittests/Analysis/Presburger/Utils.h @@ -21,6 +21,7 @@ #include "mlir/Support/LLVM.h" #include <gtest/gtest.h> +#include <optional> namespace mlir { namespace presburger { diff --git a/mlir/unittests/IR/AttributeTest.cpp b/mlir/unittests/IR/AttributeTest.cpp index a1813e6b1996..c4af61bf944a 100644 --- a/mlir/unittests/IR/AttributeTest.cpp +++ b/mlir/unittests/IR/AttributeTest.cpp @@ -11,6 +11,7 @@ #include "mlir/IR/BuiltinAttributes.h" #include "mlir/IR/BuiltinTypes.h" #include "gtest/gtest.h" +#include <optional> using namespace mlir; using namespace mlir::detail; |