mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[llvm-objdump] Document --mattr=help in --help output
This does the same as `--mcpu=help` but was only documented in the user guide. * Added a test for both options. * Corrected the single dash in `-mcpu=help` text. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D92305
This commit is contained in:
parent
f0c7b05b64
commit
5c2736b6c2
@ -156,7 +156,7 @@ OPTIONS
|
||||
|
||||
.. 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
|
||||
|
15
test/tools/llvm-objdump/mattr-mcpu-help.test
Normal file
15
test/tools/llvm-objdump/mattr-mcpu-help.test
Normal file
@ -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
|
@ -226,13 +226,13 @@ static cl::alias MachOm("m", cl::desc("Alias for --macho"), cl::NotHidden,
|
||||
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",
|
||||
|
Loading…
Reference in New Issue
Block a user