-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[lldb-dap] Gardening in lldb-dap.cpp (NFC) #128949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
JDevlieghere
commented
Feb 26, 2025
- Remove more unused includes
- Limit anonymous namespace to llvm::opt
- Fix code style
- Remove more unused includes - Limit anonymous namespace to llvm::opt - Fix code style
@llvm/pr-subscribers-lldb Author: Jonas Devlieghere (JDevlieghere) Changes
Full diff: https://github.com/llvm/llvm-project/pull/128949.diff 1 Files Affected:
diff --git a/lldb/tools/lldb-dap/lldb-dap.cpp b/lldb/tools/lldb-dap/lldb-dap.cpp
index 1c6bd7e903409..d4ebd6430d0aa 100644
--- a/lldb/tools/lldb-dap/lldb-dap.cpp
+++ b/lldb/tools/lldb-dap/lldb-dap.cpp
@@ -1,4 +1,4 @@
-//===-- lldb-dap.cpp -----------------------------------------*- C++ -*-===//
+//===-- lldb-dap.cpp ------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -8,10 +8,7 @@
#include "DAP.h"
#include "EventHelper.h"
-#include "FifoFiles.h"
#include "Handler/RequestHandler.h"
-#include "JSONUtils.h"
-#include "LLDBUtils.h"
#include "RunInTerminal.h"
#include "lldb/API/SBStream.h"
#include "lldb/Host/Config.h"
@@ -23,7 +20,6 @@
#include "lldb/lldb-forward.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/ScopeExit.h"
-#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
@@ -37,22 +33,15 @@
#include "llvm/Support/Signals.h"
#include "llvm/Support/Threading.h"
#include "llvm/Support/raw_ostream.h"
-#include <algorithm>
#include <condition_variable>
-#include <cstdint>
#include <cstdio>
#include <cstdlib>
-#include <cstring>
#include <fcntl.h>
#include <fstream>
#include <map>
#include <memory>
#include <mutex>
-#include <optional>
-#include <ostream>
#include <string>
-#include <sys/stat.h>
-#include <sys/types.h>
#include <thread>
#include <utility>
#include <vector>
@@ -113,8 +102,9 @@ class LLDBDAPOptTable : public llvm::opt::GenericOptTable {
: llvm::opt::GenericOptTable(OptionStrTable, OptionPrefixesTable,
InfoTable, true) {}
};
+} // anonymous namespace
-void RegisterRequestCallbacks(DAP &dap) {
+static void RegisterRequestCallbacks(DAP &dap) {
dap.RegisterRequest<AttachRequestHandler>();
dap.RegisterRequest<BreakpointLocationsRequestHandler>();
dap.RegisterRequest<CompletionsRequestHandler>();
@@ -155,9 +145,7 @@ void RegisterRequestCallbacks(DAP &dap) {
dap.RegisterRequest<TestGetTargetBreakpointsRequestHandler>();
}
-} // anonymous namespace
-
-static void printHelp(LLDBDAPOptTable &table, llvm::StringRef tool_name) {
+static void PrintHelp(LLDBDAPOptTable &table, llvm::StringRef tool_name) {
std::string usage_str = tool_name.str() + " options";
table.printHelp(llvm::outs(), usage_str.c_str(), "LLDB DAP", false);
@@ -433,7 +421,7 @@ int main(int argc, char *argv[]) {
llvm::opt::InputArgList input_args = T.ParseArgs(ArgsArr, MAI, MAC);
if (input_args.hasArg(OPT_help)) {
- printHelp(T, llvm::sys::path::filename(argv[0]));
+ PrintHelp(T, llvm::sys::path::filename(argv[0]));
return EXIT_SUCCESS;
}
|
ashgti
approved these changes
Feb 26, 2025
SquallATF
pushed a commit
to SquallATF/llvm-project
that referenced
this pull request
Mar 10, 2025
- Remove more unused includes - Limit anonymous namespace to llvm::opt - Fix code style
SquallATF
pushed a commit
to SquallATF/llvm-project
that referenced
this pull request
Mar 20, 2025
- Remove more unused includes - Limit anonymous namespace to llvm::opt - Fix code style
SquallATF
pushed a commit
to SquallATF/llvm-project
that referenced
this pull request
Apr 2, 2025
- Remove more unused includes - Limit anonymous namespace to llvm::opt - Fix code style
SquallATF
pushed a commit
to SquallATF/llvm-project
that referenced
this pull request
Apr 17, 2025
- Remove more unused includes - Limit anonymous namespace to llvm::opt - Fix code style
SquallATF
pushed a commit
to SquallATF/llvm-project
that referenced
this pull request
Apr 30, 2025
- Remove more unused includes - Limit anonymous namespace to llvm::opt - Fix code style
SquallATF
pushed a commit
to SquallATF/llvm-project
that referenced
this pull request
May 15, 2025
- Remove more unused includes - Limit anonymous namespace to llvm::opt - Fix code style
SquallATF
pushed a commit
to SquallATF/llvm-project
that referenced
this pull request
May 29, 2025
- Remove more unused includes - Limit anonymous namespace to llvm::opt - Fix code style
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.