-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[llvm-objdump] Remove some unneeded headers. #120541
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
Conversation
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers. If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
@llvm/pr-subscribers-llvm-binary-utilities Author: Cabbaken (cabbaken) ChangesFull diff: https://github.com/llvm/llvm-project/pull/120541.diff 5 Files Affected:
diff --git a/llvm/tools/llvm-objdump/ELFDump.cpp b/llvm/tools/llvm-objdump/ELFDump.cpp
index 5ac13495662faf..d78cf485587e1e 100644
--- a/llvm/tools/llvm-objdump/ELFDump.cpp
+++ b/llvm/tools/llvm-objdump/ELFDump.cpp
@@ -17,7 +17,6 @@
#include "llvm/Demangle/Demangle.h"
#include "llvm/Object/ELFObjectFile.h"
#include "llvm/Support/Format.h"
-#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
diff --git a/llvm/tools/llvm-objdump/SourcePrinter.cpp b/llvm/tools/llvm-objdump/SourcePrinter.cpp
index 600bd6aa4d51e5..061e4c0bd87ce6 100644
--- a/llvm/tools/llvm-objdump/SourcePrinter.cpp
+++ b/llvm/tools/llvm-objdump/SourcePrinter.cpp
@@ -15,10 +15,7 @@
#include "SourcePrinter.h"
#include "llvm-objdump.h"
#include "llvm/ADT/SmallSet.h"
-#include "llvm/ADT/StringSet.h"
#include "llvm/DebugInfo/DWARF/DWARFExpression.h"
-#include "llvm/DebugInfo/Symbolize/SymbolizableModule.h"
-#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/Support/FormatVariadic.h"
#define DEBUG_TYPE "objdump"
diff --git a/llvm/tools/llvm-objdump/XCOFFDump.cpp b/llvm/tools/llvm-objdump/XCOFFDump.cpp
index 2e8a8c82b89079..92f9ee4fb9f96d 100644
--- a/llvm/tools/llvm-objdump/XCOFFDump.cpp
+++ b/llvm/tools/llvm-objdump/XCOFFDump.cpp
@@ -18,7 +18,6 @@
#include "llvm/Demangle/Demangle.h"
#include "llvm/MC/MCInstPrinter.h"
#include "llvm/MC/MCSubtargetInfo.h"
-#include "llvm/Support/Casting.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/FormattedStream.h"
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp
index 1e74cb80b21187..93fed8ee8e6f42 100644
--- a/llvm/tools/llvm-objdump/llvm-objdump.cpp
+++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp
@@ -27,12 +27,10 @@
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SetOperations.h"
#include "llvm/ADT/StringExtras.h"
-#include "llvm/ADT/StringSet.h"
#include "llvm/ADT/Twine.h"
#include "llvm/BinaryFormat/Wasm.h"
#include "llvm/DebugInfo/BTF/BTFParser.h"
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
-#include "llvm/DebugInfo/Symbolize/SymbolizableModule.h"
#include "llvm/DebugInfo/Symbolize/Symbolize.h"
#include "llvm/Debuginfod/BuildIDFetcher.h"
#include "llvm/Debuginfod/Debuginfod.h"
@@ -40,7 +38,6 @@
#include "llvm/Demangle/Demangle.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
-#include "llvm/MC/MCDisassembler/MCDisassembler.h"
#include "llvm/MC/MCDisassembler/MCRelocationInfo.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstPrinter.h"
@@ -50,7 +47,6 @@
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCTargetOptions.h"
#include "llvm/MC/TargetRegistry.h"
-#include "llvm/Object/Archive.h"
#include "llvm/Object/BuildID.h"
#include "llvm/Object/COFF.h"
#include "llvm/Object/COFFImportFile.h"
@@ -59,7 +55,6 @@
#include "llvm/Object/FaultMapParser.h"
#include "llvm/Object/MachO.h"
#include "llvm/Object/MachOUniversal.h"
-#include "llvm/Object/ObjectFile.h"
#include "llvm/Object/OffloadBinary.h"
#include "llvm/Object/Wasm.h"
#include "llvm/Option/Arg.h"
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.h b/llvm/tools/llvm-objdump/llvm-objdump.h
index debaedd33429d0..7253cc3f4d91b7 100644
--- a/llvm/tools/llvm-objdump/llvm-objdump.h
+++ b/llvm/tools/llvm-objdump/llvm-objdump.h
@@ -15,8 +15,6 @@
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/Object/Archive.h"
#include "llvm/Object/ObjectFile.h"
-#include "llvm/Support/Compiler.h"
-#include "llvm/Support/DataTypes.h"
#include "llvm/Support/FormattedStream.h"
#include <functional>
#include <memory>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you clarify how you went about identifying which headers are unneeded, please? I note for example that StringSet
is used in llvm-objdump.cpp
.
Almost all headers I removed are included by the relative header. For example, StringSet is included by llvm-objdump.h.
It’s the first time I submit my patch to community, sorry if I did something wrong🥺.
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: James Henderson ***@***.***>
Sent: Thursday, December 19, 2024 5:41:21 PM
To: llvm/llvm-project ***@***.***>
Cc: Cabbaken ***@***.***>; Author ***@***.***>
Subject: Re: [llvm/llvm-project] [llvm-objdump] Remove some unneeded headers. (PR #120541)
@jh7370 commented on this pull request.
Could you clarify how you went about identifying which headers are unneeded, please? I note for example that StringSet is used in llvm-objdump.cpp.
—
Reply to this email directly, view it on GitHub<#120541 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AO43NCNQSFAVAHAF2XE4W5T2GKIEDAVCNFSM6AAAAABT4RAMT2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKMJTHA2TKMBZGA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Don't worry, you've done nothing wrong! I just needed to understand the context to be able to focus my review appropriately. I'll try to look at this in the next couple of workdays, but I've got a couple of higher priority items to look at before Christmas, so may not get to it. Somebody else is welcome to review it instead, if they have time! |
Thank you about that!
Happy to meet you and I will wait for the review!
…________________________________
From: James Henderson ***@***.***>
Sent: Thursday, December 19, 2024 19:15
To: llvm/llvm-project ***@***.***>
Cc: Cabbaken ***@***.***>; Author ***@***.***>
Subject: Re: [llvm/llvm-project] [llvm-objdump] Remove some unneeded headers. (PR #120541)
Almost all headers I removed are included by the relative header. For example, StringSet is included by llvm-objdump.h. It’s the first time I submit my patch to community, sorry if I did something wrong🥺.
Don't worry, you've done nothing wrong! I just needed to understand the context to be able to focus my review appropriately. I'll try to look at this in the next couple of workdays, but I've got a couple of higher priority items to look at before Christmas, so may not get to it. Somebody else is welcome to review it instead, if they have time!
—
Reply to this email directly, view it on GitHub<#120541 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AO43NCI2TENJK4RXA7MVRRL2GKTDJAVCNFSM6AAAAABT4RAMT2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNJTGQ2DSMZSGA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Do you need me to merge this?
I note that you have a private GitHub email setting applied at the moment. Please note the following from the LLVM Developer Policy:
The LLVM project uses email to communicate to contributors outside of the GitHub platform about their past contributions. Primarily, our buildbot infrastructure uses emails to contact contributors about build and test failures. Therefore, the LLVM community requires contributors to have a public email address associated with their GitHub commits, so please ensure that “Keep my email addresses private” is disabled in your account settings.
If you'd like me to merge this for you, please modify your GitHub settings according to the policy and let me know you have done so. Then I can merge it for you.
Thanks for your reply!
It's nice if my code were merged.
I am sorry about the wrong setting of my account, I have modified it and please check if it is correct now.
Thanks~😊
…________________________________
From: James Henderson ***@***.***>
Sent: Monday, December 23, 2024 16:52
To: llvm/llvm-project ***@***.***>
Cc: Cabbaken ***@***.***>; Author ***@***.***>
Subject: Re: [llvm/llvm-project] [llvm-objdump] Remove some unneeded headers. (PR #120541)
@jh7370 commented on this pull request.
LGTM. Do you need me to merge this?
I note that you have a private GitHub email setting applied at the moment. Please note the following from the LLVM Developer Policy:
The LLVM project uses email to communicate to contributors outside of the GitHub platform about their past contributions. Primarily, our buildbot infrastructure uses emails to contact contributors about build and test failures. Therefore, the LLVM community requires contributors to have a public email address associated with their GitHub commits, so please ensure that “Keep my email addresses private” is disabled in your account settings<https://github.com/settings/emails>.
If you'd like me to merge this for you, please modify your GitHub settings according to the policy and let me know you have done so. Then I can merge it for you.
—
Reply to this email directly, view it on GitHub<#120541 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AO43NCIFXRWDNNCKQ3O2STL2G7FLTAVCNFSM6AAAAABT4RAMT2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKMRQGE4DOMRRG4>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
@cabbaken Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR. Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues. How to do this, and the rest of the post-merge process, is covered in detail here. If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again. If you don't get any reports, no action is required from you. Your changes are working as expected, well done! |
Done and not an issue - I get the impression it might be set by default these days. |
No description provided.