[PATCH] D33873: [llvm-readobj] Accept (and ignore) --wide (-W) command-line switch
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 18 16:59:50 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL308396: [llvm-readobj] Accept (and ignore) --wide (-W) command-line switch (authored by phosek).
Changed prior to commit:
https://reviews.llvm.org/D33873?vs=101341&id=107210#toc
Repository:
rL LLVM
https://reviews.llvm.org/D33873
Files:
llvm/trunk/test/tools/llvm-readobj/gnu-sections.test
llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp
Index: llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp
===================================================================
--- llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp
+++ llvm/trunk/tools/llvm-readobj/llvm-readobj.cpp
@@ -50,6 +50,13 @@
cl::desc("<input object files>"),
cl::ZeroOrMore);
+ // -wide, -W
+ cl::opt<bool> WideOutput("wide",
+ cl::desc("Ignored for compatibility with GNU readelf"));
+ cl::alias WideOutputShort("W",
+ cl::desc("Alias for --wide"),
+ cl::aliasopt(WideOutput));
+
// -file-headers, -h
cl::opt<bool> FileHeaders("file-headers",
cl::desc("Display file headers "));
@@ -544,6 +551,8 @@
// Register the target printer for --version.
cl::AddExtraVersionPrinter(TargetRegistry::printRegisteredTargetsForVersion);
+ opts::WideOutput.setHiddenFlag(cl::Hidden);
+
cl::ParseCommandLineOptions(argc, argv, "LLVM Object Reader\n");
// Default to stdin if no filename is specified.
Index: llvm/trunk/test/tools/llvm-readobj/gnu-sections.test
===================================================================
--- llvm/trunk/test/tools/llvm-readobj/gnu-sections.test
+++ llvm/trunk/test/tools/llvm-readobj/gnu-sections.test
@@ -2,6 +2,12 @@
RUN: | FileCheck %s -check-prefix ELF32
RUN: llvm-readobj -S %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \
RUN: | FileCheck %s -check-prefix ELF64
+RUN: llvm-readobj --wide --sections \
+RUN: %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \
+RUN: | FileCheck %s -check-prefix ELF64
+RUN: llvm-readobj -W --sections \
+RUN: %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \
+RUN: | FileCheck %s -check-prefix ELF64
ELF32: Section Headers:
ELF32-NEXT: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33873.107210.patch
Type: text/x-patch
Size: 1797 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170718/65647fd9/attachment.bin>
More information about the llvm-commits
mailing list