https://github.com/akashagrwl updated https://github.com/llvm/llvm-project/pull/141478
>From 72ce442847fe03dd489938eff0eee06c65f53e90 Mon Sep 17 00:00:00 2001 From: Akash Agrawal <akas...@qti.qualcomm.com> Date: Mon, 26 May 2025 16:54:21 +0530 Subject: [PATCH 1/3] [LLVM] [NFC] - Remove duplicate #include headers from the files of lldb dir & few other files Change-Id: I50d7df02e2dc4f493c46c4044a4e7a4ca7e03355 --- clang/lib/InstallAPI/FileList.cpp | 2 +- compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.cpp | 1 - lldb/source/API/SBInstruction.cpp | 2 +- lldb/source/API/SBPlatform.cpp | 2 +- lldb/source/Core/Telemetry.cpp | 2 +- lldb/source/Interpreter/CommandObject.cpp | 1 - .../DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp | 3 --- .../Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp | 2 -- .../Plugins/Process/FreeBSDKernel/ThreadFreeBSDKernel.cpp | 1 - lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp | 1 - lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp | 1 - lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp | 1 - lldb/source/Target/ScriptedThreadPlan.cpp | 1 - lldb/source/ValueObject/ValueObject.cpp | 1 - lldb/tools/debugserver/source/RNBRemote.cpp | 1 - 15 files changed, 4 insertions(+), 18 deletions(-) diff --git a/clang/lib/InstallAPI/FileList.cpp b/clang/lib/InstallAPI/FileList.cpp index 65610903840af..27e8a2c5b2556 100644 --- a/clang/lib/InstallAPI/FileList.cpp +++ b/clang/lib/InstallAPI/FileList.cpp @@ -7,8 +7,8 @@ //===----------------------------------------------------------------------===// #include "clang/InstallAPI/FileList.h" + #include "clang/Basic/DiagnosticFrontend.h" -#include "clang/InstallAPI/FileList.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/Support/Error.h" #include "llvm/Support/JSON.h" diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.cpp index ca37df348580a..7566d438d60df 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.cpp +++ b/compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.cpp @@ -13,7 +13,6 @@ #include "sanitizer_flag_parser.h" #include "sanitizer_common.h" -#include "sanitizer_flag_parser.h" #include "sanitizer_flags.h" #include "sanitizer_libc.h" diff --git a/lldb/source/API/SBInstruction.cpp b/lldb/source/API/SBInstruction.cpp index 30703eea6fa6c..5d21b92b3607e 100644 --- a/lldb/source/API/SBInstruction.cpp +++ b/lldb/source/API/SBInstruction.cpp @@ -7,13 +7,13 @@ //===----------------------------------------------------------------------===// #include "lldb/API/SBInstruction.h" + #include "lldb/Utility/Instrumentation.h" #include "lldb/API/SBAddress.h" #include "lldb/API/SBFrame.h" #include "lldb/API/SBFile.h" -#include "lldb/API/SBInstruction.h" #include "lldb/API/SBStream.h" #include "lldb/API/SBTarget.h" #include "lldb/Core/Disassembler.h" diff --git a/lldb/source/API/SBPlatform.cpp b/lldb/source/API/SBPlatform.cpp index 394268b77aa21..95d5fa5b14d0e 100644 --- a/lldb/source/API/SBPlatform.cpp +++ b/lldb/source/API/SBPlatform.cpp @@ -7,13 +7,13 @@ //===----------------------------------------------------------------------===// #include "lldb/API/SBPlatform.h" + #include "lldb/API/SBDebugger.h" #include "lldb/API/SBEnvironment.h" #include "lldb/API/SBError.h" #include "lldb/API/SBFileSpec.h" #include "lldb/API/SBLaunchInfo.h" #include "lldb/API/SBModuleSpec.h" -#include "lldb/API/SBPlatform.h" #include "lldb/API/SBProcessInfoList.h" #include "lldb/API/SBTarget.h" #include "lldb/API/SBUnixSignals.h" diff --git a/lldb/source/Core/Telemetry.cpp b/lldb/source/Core/Telemetry.cpp index a819d5366cedc..c87581761c45e 100644 --- a/lldb/source/Core/Telemetry.cpp +++ b/lldb/source/Core/Telemetry.cpp @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// #include "lldb/Core/Telemetry.h" + #include "lldb/Core/Debugger.h" -#include "lldb/Core/Telemetry.h" #include "lldb/Utility/LLDBLog.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/UUID.h" diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp index 72dd546dd6523..129646ebddb94 100644 --- a/lldb/source/Interpreter/CommandObject.cpp +++ b/lldb/source/Interpreter/CommandObject.cpp @@ -32,7 +32,6 @@ #include "lldb/Target/Language.h" #include "lldb/Interpreter/CommandInterpreter.h" -#include "lldb/Interpreter/CommandOptionArgumentTable.h" #include "lldb/Interpreter/CommandReturnObject.h" using namespace lldb; diff --git a/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp b/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp index d2bf2586cd82b..07f70f45985f7 100644 --- a/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp +++ b/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp @@ -13,10 +13,7 @@ #include "lldb/Target/Target.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/Status.h" - #include "lldb/Symbol/ObjectFile.h" -#include "lldb/Target/Process.h" -#include "lldb/Target/Target.h" #include "HexagonDYLDRendezvous.h" diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp index 959cbb282b043..7aa9cae5a5614 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp @@ -61,10 +61,8 @@ #include "ASTUtils.h" #include "ClangASTSource.h" -#include "ClangDiagnostic.h" #include "ClangExpressionDeclMap.h" #include "ClangExpressionHelper.h" -#include "ClangExpressionParser.h" #include "ClangHost.h" #include "ClangModulesDeclVendor.h" #include "ClangPersistentVariables.h" diff --git a/lldb/source/Plugins/Process/FreeBSDKernel/ThreadFreeBSDKernel.cpp b/lldb/source/Plugins/Process/FreeBSDKernel/ThreadFreeBSDKernel.cpp index 8d304086a163b..24e7943cba0e2 100644 --- a/lldb/source/Plugins/Process/FreeBSDKernel/ThreadFreeBSDKernel.cpp +++ b/lldb/source/Plugins/Process/FreeBSDKernel/ThreadFreeBSDKernel.cpp @@ -18,7 +18,6 @@ #include "RegisterContextFreeBSDKernel_arm64.h" #include "RegisterContextFreeBSDKernel_i386.h" #include "RegisterContextFreeBSDKernel_x86_64.h" -#include "ThreadFreeBSDKernel.h" using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp b/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp index 515d58abc0d2c..e8c53714ec0c7 100644 --- a/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp +++ b/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp @@ -26,7 +26,6 @@ #include <sstream> // clang-format off -#include <sys/types.h> #include <sys/sysctl.h> // clang-format on diff --git a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp index f0c3dd5016139..27530f032ce51 100644 --- a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp +++ b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp @@ -22,7 +22,6 @@ #include "lldb/Host/HostNativeProcessBase.h" #include "lldb/Host/HostProcess.h" #include "lldb/Host/windows/HostThreadWindows.h" -#include "lldb/Host/windows/windows.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Target/DynamicLoader.h" #include "lldb/Target/MemoryRegionInfo.h" diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp index 8c19d5be76bcf..9a434d9c12523 100644 --- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp +++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp @@ -82,7 +82,6 @@ #include <cstdio> -#include <mutex> #include <optional> using namespace lldb; diff --git a/lldb/source/Target/ScriptedThreadPlan.cpp b/lldb/source/Target/ScriptedThreadPlan.cpp index c4bdc8d080e35..7b59231f14d21 100644 --- a/lldb/source/Target/ScriptedThreadPlan.cpp +++ b/lldb/source/Target/ScriptedThreadPlan.cpp @@ -17,7 +17,6 @@ #include "lldb/Target/ScriptedThreadPlan.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" -#include "lldb/Target/ThreadPlan.h" #include "lldb/Utility/LLDBLog.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/State.h" diff --git a/lldb/source/ValueObject/ValueObject.cpp b/lldb/source/ValueObject/ValueObject.cpp index 487c95ca03a69..29ddeba3df18e 100644 --- a/lldb/source/ValueObject/ValueObject.cpp +++ b/lldb/source/ValueObject/ValueObject.cpp @@ -41,7 +41,6 @@ #include "lldb/Utility/Scalar.h" #include "lldb/Utility/Stream.h" #include "lldb/Utility/StreamString.h" -#include "lldb/ValueObject/ValueObject.h" #include "lldb/ValueObject/ValueObjectCast.h" #include "lldb/ValueObject/ValueObjectChild.h" #include "lldb/ValueObject/ValueObjectConstResult.h" diff --git a/lldb/tools/debugserver/source/RNBRemote.cpp b/lldb/tools/debugserver/source/RNBRemote.cpp index e0831023e7ae4..af3c66c71c77e 100644 --- a/lldb/tools/debugserver/source/RNBRemote.cpp +++ b/lldb/tools/debugserver/source/RNBRemote.cpp @@ -38,7 +38,6 @@ #include "DNBThreadResumeActions.h" #include "JSON.h" #include "JSONGenerator.h" -#include "JSONGenerator.h" #include "MacOSX/Genealogy.h" #include "OsLogger.h" #include "RNBContext.h" >From a248b725ae669aa05034fb2cf5a87ad91d0ca200 Mon Sep 17 00:00:00 2001 From: Akash Agrawal <akas...@qti.qualcomm.com> Date: Mon, 26 May 2025 17:08:19 +0530 Subject: [PATCH 2/3] fixed the sorting issue reported by clang-format Change-Id: Ibccf53c482276b5cda2fc0e6e166a61f263754a1 --- .../DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp b/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp index 07f70f45985f7..62c0fb0ff4eb8 100644 --- a/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp +++ b/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp @@ -7,13 +7,13 @@ //===----------------------------------------------------------------------===// #include "lldb/Core/Module.h" +#include "lldb/Symbol/ObjectFile.h" #include "lldb/Symbol/Symbol.h" #include "lldb/Symbol/SymbolContext.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/Status.h" -#include "lldb/Symbol/ObjectFile.h" #include "HexagonDYLDRendezvous.h" >From fbbcc749e6cd397450bcffa9d76117c3ad6d47fa Mon Sep 17 00:00:00 2001 From: Akash Agrawal <akas...@qti.qualcomm.com> Date: Wed, 28 May 2025 12:11:14 +0530 Subject: [PATCH 3/3] Addressing comments - removed the extra line & non lldb file changes Change-Id: Ie9db37b4b540f0b103ababaef4b922d218d5bfb5 --- clang/lib/InstallAPI/FileList.cpp | 2 +- compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.cpp | 1 + lldb/source/API/SBInstruction.cpp | 1 - lldb/source/API/SBPlatform.cpp | 1 - lldb/source/Core/Telemetry.cpp | 1 - 5 files changed, 2 insertions(+), 4 deletions(-) diff --git a/clang/lib/InstallAPI/FileList.cpp b/clang/lib/InstallAPI/FileList.cpp index 27e8a2c5b2556..65610903840af 100644 --- a/clang/lib/InstallAPI/FileList.cpp +++ b/clang/lib/InstallAPI/FileList.cpp @@ -7,8 +7,8 @@ //===----------------------------------------------------------------------===// #include "clang/InstallAPI/FileList.h" - #include "clang/Basic/DiagnosticFrontend.h" +#include "clang/InstallAPI/FileList.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/Support/Error.h" #include "llvm/Support/JSON.h" diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.cpp index 7566d438d60df..ca37df348580a 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.cpp +++ b/compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.cpp @@ -13,6 +13,7 @@ #include "sanitizer_flag_parser.h" #include "sanitizer_common.h" +#include "sanitizer_flag_parser.h" #include "sanitizer_flags.h" #include "sanitizer_libc.h" diff --git a/lldb/source/API/SBInstruction.cpp b/lldb/source/API/SBInstruction.cpp index 5d21b92b3607e..6755089af39a4 100644 --- a/lldb/source/API/SBInstruction.cpp +++ b/lldb/source/API/SBInstruction.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include "lldb/API/SBInstruction.h" - #include "lldb/Utility/Instrumentation.h" #include "lldb/API/SBAddress.h" diff --git a/lldb/source/API/SBPlatform.cpp b/lldb/source/API/SBPlatform.cpp index 95d5fa5b14d0e..ec59e27a08b30 100644 --- a/lldb/source/API/SBPlatform.cpp +++ b/lldb/source/API/SBPlatform.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include "lldb/API/SBPlatform.h" - #include "lldb/API/SBDebugger.h" #include "lldb/API/SBEnvironment.h" #include "lldb/API/SBError.h" diff --git a/lldb/source/Core/Telemetry.cpp b/lldb/source/Core/Telemetry.cpp index c87581761c45e..6434b11a63ad4 100644 --- a/lldb/source/Core/Telemetry.cpp +++ b/lldb/source/Core/Telemetry.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// #include "lldb/Core/Telemetry.h" - #include "lldb/Core/Debugger.h" #include "lldb/Utility/LLDBLog.h" #include "lldb/Utility/Log.h" _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits