[PATCH] D92305: [llvm-objdump] Document --mattr=help in --help output
David Spickett via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 30 04:51:36 PST 2020
DavidSpickett updated this revision to Diff 308326.
DavidSpickett added a comment.
- Double `#` for comment
- Add dashes to ELF header
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92305/new/
https://reviews.llvm.org/D92305
Files:
llvm/docs/CommandGuide/llvm-objdump.rst
llvm/test/tools/llvm-objdump/mattr-mcpu-help.test
llvm/tools/llvm-objdump/llvm-objdump.cpp
Index: llvm/tools/llvm-objdump/llvm-objdump.cpp
===================================================================
--- llvm/tools/llvm-objdump/llvm-objdump.cpp
+++ llvm/tools/llvm-objdump/llvm-objdump.cpp
@@ -226,13 +226,13 @@
cl::Grouping, cl::aliasopt(MachOOpt));
cl::opt<std::string> objdump::MCPU(
- "mcpu", cl::desc("Target a specific cpu type (-mcpu=help for details)"),
+ "mcpu", cl::desc("Target a specific cpu type (--mcpu=help for details)"),
cl::value_desc("cpu-name"), cl::init(""), cl::cat(ObjdumpCat));
-cl::list<std::string> objdump::MAttrs("mattr", cl::CommaSeparated,
- cl::desc("Target specific attributes"),
- cl::value_desc("a1,+a2,-a3,..."),
- cl::cat(ObjdumpCat));
+cl::list<std::string> objdump::MAttrs(
+ "mattr", cl::CommaSeparated,
+ cl::desc("Target specific attributes (--mattr=help for details)"),
+ cl::value_desc("a1,+a2,-a3,..."), cl::cat(ObjdumpCat));
cl::opt<bool> objdump::NoShowRawInsn(
"no-show-raw-insn",
Index: llvm/test/tools/llvm-objdump/mattr-mcpu-help.test
===================================================================
--- /dev/null
+++ llvm/test/tools/llvm-objdump/mattr-mcpu-help.test
@@ -0,0 +1,15 @@
+# RUN: yaml2obj %s -o %t
+# RUN: llvm-objdump -d %t --mattr=help 2>&1 | FileCheck %s
+# RUN: llvm-objdump -d %t --mcpu=help 2>&1 | FileCheck %s
+
+# CHECK: Available CPUs for this target:
+# CHECK: Available features for this target:
+## To check we still disassemble the file:
+# CHECK: file format elf64-x86-64
+
+--- !ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_EXEC
+ Machine: EM_X86_64
Index: llvm/docs/CommandGuide/llvm-objdump.rst
===================================================================
--- llvm/docs/CommandGuide/llvm-objdump.rst
+++ llvm/docs/CommandGuide/llvm-objdump.rst
@@ -156,7 +156,7 @@
.. option:: --mattr=<a1,+a2,-a3,...>
- Enable/disable target-specific attributes. Specify ``--mcpu=help`` to display
+ Enable/disable target-specific attributes. Specify ``--mattr=help`` to display
the available attributes.
.. option:: --no-leading-addr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92305.308326.patch
Type: text/x-patch
Size: 2273 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201130/a7562f3d/attachment.bin>
More information about the llvm-commits
mailing list