[llvm] [llvm-objdump] Eliminate the dependency of `--mcpu=help` and `--mattr=help` on `-d` (PR #165661)
Ruoyu Qiu via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 4 01:06:23 PST 2025
================
@@ -3533,6 +3533,35 @@ commaSeparatedValues(const llvm::opt::InputArgList &InputArgs, int ID) {
return Values;
}
+static void mcpuHelp() {
+ std::string Error;
+ Triple TheTriple;
+
+ if (!TripleName.empty()) {
+ TheTriple.setTriple(TripleName);
+ } else {
+ // If the target triple is derived from the files, we display help message
+ // when disassembling them.
+ if (Disassemble)
+ return;
+ if (InputFilenames.size() != 1)
+ reportWarning("When multiple files are specified, only the first file is "
----------------
cabbaken wrote:
> I don't think this needs to be a loop. If somebody is relying on the triple coming from the input file, I think it's reasonable to hit an error if the file is not an ObjectFile, rather than looking for an input file later in the list. This will simplify the code and testing.
Should we simply treat InputFilenames as containing a single element?
https://github.com/llvm/llvm-project/pull/165661
More information about the llvm-commits
mailing list