summaryrefslogtreecommitdiff
path: root/lldb/tools
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-01-07 13:43:00 -0800
committerKazu Hirata <kazu@google.com>2023-01-07 13:43:00 -0800
commitf190ce625ab0dc5a5e2b2515e6d26debb34843ab (patch)
tree75b7c2680b3968db3c05ee3765ee3fe622e630c1 /lldb/tools
parent6fe70cb465654eafafd272231e23762adeab4290 (diff)
downloadllvm-f190ce625ab0dc5a5e2b2515e6d26debb34843ab.tar.gz
[lldb] 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 'lldb/tools')
-rw-r--r--lldb/tools/lldb-server/Acceptor.cpp1
-rw-r--r--lldb/tools/lldb-server/lldb-platform.cpp1
-rw-r--r--lldb/tools/lldb-test/lldb-test.cpp1
-rw-r--r--lldb/tools/lldb-vscode/FifoFiles.cpp1
-rw-r--r--lldb/tools/lldb-vscode/JSONUtils.cpp1
-rw-r--r--lldb/tools/lldb-vscode/JSONUtils.h1
-rw-r--r--lldb/tools/lldb-vscode/ProgressEvent.cpp1
-rw-r--r--lldb/tools/lldb-vscode/ProgressEvent.h1
8 files changed, 8 insertions, 0 deletions
diff --git a/lldb/tools/lldb-server/Acceptor.cpp b/lldb/tools/lldb-server/Acceptor.cpp
index 4714252011aa..0b69350c1acc 100644
--- a/lldb/tools/lldb-server/Acceptor.cpp
+++ b/lldb/tools/lldb-server/Acceptor.cpp
@@ -15,6 +15,7 @@
#include "lldb/Host/common/TCPSocket.h"
#include "lldb/Utility/StreamString.h"
#include "lldb/Utility/UriParser.h"
+#include <optional>
using namespace lldb;
using namespace lldb_private;
diff --git a/lldb/tools/lldb-server/lldb-platform.cpp b/lldb/tools/lldb-server/lldb-platform.cpp
index 0211de77bb75..fb37aa6f6175 100644
--- a/lldb/tools/lldb-server/lldb-platform.cpp
+++ b/lldb/tools/lldb-server/lldb-platform.cpp
@@ -19,6 +19,7 @@
#include <sys/wait.h>
#endif
#include <fstream>
+#include <optional>
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/FileUtilities.h"
diff --git a/lldb/tools/lldb-test/lldb-test.cpp b/lldb/tools/lldb-test/lldb-test.cpp
index cb04ca5d50e2..6bd8585bdabe 100644
--- a/lldb/tools/lldb-test/lldb-test.cpp
+++ b/lldb/tools/lldb-test/lldb-test.cpp
@@ -46,6 +46,7 @@
#include "llvm/Support/WithColor.h"
#include <cstdio>
+#include <optional>
#include <thread>
using namespace lldb;
diff --git a/lldb/tools/lldb-vscode/FifoFiles.cpp b/lldb/tools/lldb-vscode/FifoFiles.cpp
index 6cde4a493076..18354bfabcea 100644
--- a/lldb/tools/lldb-vscode/FifoFiles.cpp
+++ b/lldb/tools/lldb-vscode/FifoFiles.cpp
@@ -17,6 +17,7 @@
#include <chrono>
#include <fstream>
#include <future>
+#include <optional>
#include <thread>
#include "llvm/Support/FileSystem.h"
diff --git a/lldb/tools/lldb-vscode/JSONUtils.cpp b/lldb/tools/lldb-vscode/JSONUtils.cpp
index 5593d7be3b66..06d5c28c2a1b 100644
--- a/lldb/tools/lldb-vscode/JSONUtils.cpp
+++ b/lldb/tools/lldb-vscode/JSONUtils.cpp
@@ -8,6 +8,7 @@
#include <algorithm>
#include <iomanip>
+#include <optional>
#include <sstream>
#include <string.h>
diff --git a/lldb/tools/lldb-vscode/JSONUtils.h b/lldb/tools/lldb-vscode/JSONUtils.h
index 011c107b9ab1..64c1a4c3d554 100644
--- a/lldb/tools/lldb-vscode/JSONUtils.h
+++ b/lldb/tools/lldb-vscode/JSONUtils.h
@@ -14,6 +14,7 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/JSON.h"
#include <cstdint>
+#include <optional>
namespace lldb_vscode {
diff --git a/lldb/tools/lldb-vscode/ProgressEvent.cpp b/lldb/tools/lldb-vscode/ProgressEvent.cpp
index 69a8a2eabb95..57658768eac1 100644
--- a/lldb/tools/lldb-vscode/ProgressEvent.cpp
+++ b/lldb/tools/lldb-vscode/ProgressEvent.cpp
@@ -9,6 +9,7 @@
#include "ProgressEvent.h"
#include "JSONUtils.h"
+#include <optional>
using namespace lldb_vscode;
using namespace llvm;
diff --git a/lldb/tools/lldb-vscode/ProgressEvent.h b/lldb/tools/lldb-vscode/ProgressEvent.h
index 7fa79ffca0fc..376c4a320768 100644
--- a/lldb/tools/lldb-vscode/ProgressEvent.h
+++ b/lldb/tools/lldb-vscode/ProgressEvent.h
@@ -8,6 +8,7 @@
#include <atomic>
#include <mutex>
+#include <optional>
#include <queue>
#include <thread>