summaryrefslogtreecommitdiff
path: root/cross-project-tests/debuginfo-tests
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-01-14 20:56:10 -0800
committerKazu Hirata <kazu@google.com>2023-01-14 20:56:10 -0800
commit9f72b78be5427ba0a7d029cf576429b515e142d8 (patch)
tree6d9180bdb4eb1c65c2295163ad5db4153f337d9a /cross-project-tests/debuginfo-tests
parentb5516be05654ecdd4fd7e317b1f21f940c1a967b (diff)
downloadllvm-9f72b78be5427ba0a7d029cf576429b515e142d8.tar.gz
[cross-project-tests] Use std::optional instead of llvm::Optional (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/debuginfo-tests')
-rw-r--r--cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.cpp5
1 files changed, 2 insertions, 3 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 c5b4deefc0c6..c0168ab2bf28 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
@@ -1,6 +1,5 @@
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/Optional.h"
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/SmallString.h"
@@ -20,8 +19,8 @@ llvm::DenseMap<int, int> DenseMap = {{4, 5}, {6, 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(std::nullopt);
+std::optional<int> OptionalValue(9);
+std::optional<int> OptionalNone(std::nullopt);
llvm::SmallVector<int, 5> SmallVector = {10, 11, 12};
llvm::SmallString<5> SmallString("foo");
llvm::StringRef StringRef = "bar";