aboutsummaryrefslogtreecommitdiff
path: root/cross-project-tests
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-12-10 17:37:55 -0800
committerKazu Hirata <kazu@google.com>2022-12-10 17:37:55 -0800
commit13f489e75077a49aa3b44a369eeb1e1b3998691a (patch)
tree577c9241210851d5be47f2a72aaf05771377d825 /cross-project-tests
parent4f81805a3f8874ad055586724c3985c190bca801 (diff)
downloadllvm-13f489e75077a49aa3b44a369eeb1e1b3998691a.zip
llvm-13f489e75077a49aa3b44a369eeb1e1b3998691a.tar.gz
llvm-13f489e75077a49aa3b44a369eeb1e1b3998691a.tar.bz2
[cross-project-tests] Use std::nullopt instead of llvm::None (NFC)
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 'cross-project-tests')
-rw-r--r--cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.cpp b/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.cpp
index 9d08582..c5b4dee 100644
--- a/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.cpp
+++ b/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.cpp
@@ -9,6 +9,7 @@
#include "llvm/ADT/Twine.h"
#include "llvm/ADT/ilist.h"
#include "llvm/Support/Error.h"
+#include <optional>
int Array[] = {1, 2, 3};
auto IntPtr = reinterpret_cast<int *>(0xabc);
@@ -20,7 +21,7 @@ llvm::StringMap<int> StringMap = {{"foo", 123}, {"bar", 456}};
llvm::Expected<int> ExpectedValue(8);
llvm::Expected<int> ExpectedError(llvm::createStringError({}, ""));
llvm::Optional<int> OptionalValue(9);
-llvm::Optional<int> OptionalNone(llvm::None);
+llvm::Optional<int> OptionalNone(std::nullopt);
llvm::SmallVector<int, 5> SmallVector = {10, 11, 12};
llvm::SmallString<5> SmallString("foo");
llvm::StringRef StringRef = "bar";